**Studies in Fuzziness and Soft Computing**

Piotr Prokopowicz Jacek Czerniak Dariusz Mikołajewski Łukasz Apiecionek Dominik Ślezak Editors

# Theory and Applications of Ordered Fuzzy Numbers

A Tribute to Professor Witold Kosiński

# Studies in Fuzziness and Soft Computing

Volume 356

#### Series editor

Janusz Kacprzyk, Polish Academy of Sciences, Warsaw, Poland e-mail: kacprzyk@ibspan.waw.pl

#### About this Series

The series "Studies in Fuzziness and Soft Computing" contains publications on various topics in the area of soft computing, which include fuzzy sets, rough sets, neural networks, evolutionary computation, probabilistic and evidential reasoning, multi-valued logic, and related fields. The publications within "Studies in Fuzziness and Soft Computing" are primarily monographs and edited volumes. They cover significant recent developments in the field, both of a foundational and applicable character. An important feature of the series is its short publication time and world-wide distribution. This permits a rapid and broad dissemination of research results.

More information about this series at http://www.springer.com/series/2941

Piotr Prokopowicz • Jacek Czerniak Dariusz Mikołajewski • Łukasz Apiecionek Dominik Ślȩzak Editors

# Theory and Applications of Ordered Fuzzy Numbers

A Tribute to Professor Witold Kosiński

Editors Piotr Prokopowicz Faculty of Mathematics, Physics and Technical Science, Institute of Mechanics and Applied Computer Science Kazimierz Wielki University Bydgoszcz Poland

Jacek Czerniak Faculty of Mathematics, Physics and Technical Science, Institute of Technology Kazimierz Wielki University Bydgoszcz Poland

Dariusz Mikołajewski Faculty of Mathematics, Physics and Technical Science, Institute of Mechanics and Applied Computer Science Kazimierz Wielki University Bydgoszcz Poland

#### and

Neurocognitive Laboratory, Centre for Modern Interdisciplinary Technologies Nicolaus Copernicus University Toruń Poland

Łukasz Apiecionek Faculty of Mathematics, Physics and Technical Science, Institute of Technology Kazimierz Wielki University Bydgoszcz Poland

Dominik Ślȩzak Faculty of Mathematics, Informatics and Mechanics University of Warsaw Warsaw Poland

ISSN 1434-9922 ISSN 1860-0808 (electronic) Studies in Fuzziness and Soft Computing ISBN 978-3-319-59613-6 ISBN 978-3-319-59614-3 (eBook) DOI 10.1007/978-3-319-59614-3

Library of Congress Control Number: 2017943200

© The Editor(s) (if applicable) and The Author(s) 2017. This book is an open access publication.

Open Access This book is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this book are included in the book's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the book's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use.

The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, express or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Printed on acid-free paper

This Springer imprint is published by Springer Nature The registered company is Springer International Publishing AG The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland

Witold Kosiński (1946–2014)

# Foreword

I met Witek Kosiński 20 years ago (almost to the day), as at that time he was appointed by the Institute of Computer Science, Polish Academy of Sciences, as a reviewer for my DSc (habilitation) thesis. His review was quite positive (!) and from that time we developed a long-lasting friendship. Later, both of us were associated with the Polish-Japanese Academy of Information Technology and together we supervised a few students, introduced new courses (e.g., puzzle-based learning), worked on several research grants, and wrote a few research papers. He, with his wife Ewa, visited us in the United States and stayed with us in our home; they also planned to visit us in Australia. Unfortunately, time had run out for him.

It is my privilege to write the foreword for this book. First, I consider Witek one of the best friends I had in life. Second, his warm personality, sense of humor, and amazing intelligence made him a very special person in the lives and careers of so many people. Finally, the book covers many topics that were close to Witek's heart —fuzzy sets, fuzzy systems, Ordered Fuzzy Numbers—to name a few. He also had a keen interest in applications of his research, and thus the third part of the book contains 11 application-oriented chapters.

Witek—you'll live in our memories forever. We miss you.

February 2017 Zbigniew Michalewicz

# Memories of Professor Witold Kosiński

Józef Kubik, Mariusz Kaczmarek, Marcin Sydow and Dominik Ślȩzak

Professor Witold Kosiński, Polish mathematician and computer scientist, specialist in the fields of mathematical theory of continuous media and various methods of artificial intelligence with particular focus on fuzzy logic, conducted creative and very intense research activities for more than 40 years, combining research with broad international cooperation and regular teaching.

# Scientific Development

Witold Kosiński was born in Kraków on August 13, 1946. He attended the Juliusz Slowacki High School in Warsaw in the years 1960–1964.

In 1969, he graduated from the University of Warsaw, the Faculty of Mathematics and Mechanics, obtaining his M.Sc. degree in mathematics for the thesis, "On the Existence of Two Variables Satisfying Some Differential Inequality." His supervisor was Prof. Jan Rychlewski, later a member of the Polish Academy of Sciences.

Directly upon graduation he became a member of the Department of Mechanics of Continuous Media in the Institute of Fundamental Technological Research of the

Institute of Mechanics and Applied Computer Science,

Marcin Sydow

Dominik Ślȩzak Institute of Informatics, University of Warsaw, Warsaw, Poland, e-mail: slezak@mimuw.edu.pl

Józef Kubik, Mariusz Kaczmarek

Kazimierz Wielki University, Bydgoszcz, Poland, e-mail: mkk@ukw.edu.pl

Polish-Japanese Academy of Information Technology, Warsaw, Poland, e-mail: msyd@poljap.edu.pl

Polish Academy of Sciences, where he continued to develop his scientific qualifications by participation in doctoral studies.

In 1972, he obtained his Ph.D. degree in technical sciences with his dissertation, "Linear Theory of Rheological Materials with Internal Structural Changes." His supervisor was Prof. Piotr Perzyna, a great scientist and author of one of the important directions within viscoelasticity theory. Very soon, Dr. Kosiński's ability to combine mathematical methods with a modern approach to mechanics of deformable dissipative materials resulted in a number of achievements. In the years 1972–1974, he coauthored 19 research papers, 10 of which were published in the renowned Bulletin of the Polish Academy of Sciences.

In 1984 his research related to dissipative media led to the summarizing article on the equations of dissipative materials' evolution resulting in the title of Doctor of Sciences (habilitation) in mechanical engineering being conferred upon him by the Scientific Council of the Institute of Fundamental Technological Research of the Polish Academy of Sciences. Finally, in 1993 his extensive research and teaching activities became the basis of granting him the title of full professor of technical sciences by the President of the Republic of Poland.

# Scientific and Academic Achievements (Part I)

For most of his professional career Prof. Kosiński was affiliated with the Institute of Fundamental Technological Research of the Polish Academy of Sciences (1972– 2001). In that period, he achieved numerous original results that contributed to international research on thermodynamics of materials with memory and materials with internal variables.

Those studies also concerned thermal waves in nonelastic media with so-called second sound effect, and were carried out jointly with other coauthors including, among others, V.A. Cimmelli, K. Frischmuth, K. Saxton, R. Saxton, W. Wojno, and P. Perzyna. Other studies on thermodynamics of porous media saturated with liquid were performed with the cooperation of K. Hutter, J. Kubik, M. Cieszko, and M. Kaczmarek. The monograph entitled Clear-cut Nature of Initial and Boundary-value Solutions in the Theory of High and Low Non-elastic Strain in Scope of Hyperbolic Problems (W. Kosiński, Ed., Ossolineum, 1979) aroused much interest. Particular recognition was gained by the monograph, Field Singularities and Wave Analysis in Continuum Mechanics (W. Kosiński, Ellis Horwood, Mathematics and Applications, 1986), which formulated the foundations of the kinematic theory of discontinuity surface propagation, the velocity of which depends on a nonlinear medium's properties. The aforementioned range of Prof. Kosiński's research on mechanics of continuous media includes over 100 published scientific papers, two monographs, and contributions to nine multiauthored volumes.

# Scientific and Academic Achievements (Part II)

In 1999, Prof. Kosiński started his scientific and teaching activities at the Polish-Japanese Academy of Information Technology (PJAIT; formerly the Polish-Japanese Institute of Information Technology), where he served as a member of the Senate and Council of the IT faculty. In 1999–2005, he acted as the PJAIT vice-president for research. He was the head of the Multimedia and Artificial Intelligence Department, and then the Smart Systems Department and Research Center. He was also a coordinator of specializations in Intelligent Data Processing Systems, and Business and Administration Support Systems.

PJAIT-related activities came together with Prof. Kosiński's growing scientific interests in information technology and intelligent systems, with an emphasis on neural networks, image processing, fuzzy logic, and nature-inspired optimization algorithms. Those interests could be seen even earlier. In the 1990s, he coauthored some articles on fuzzy numbers and neuro-fuzzy systems, for example, "Fuzzy Numbers and Their Quotient Space with Algebraic Operations" (W. Kosiński, P. Slysz, Bulletin of Polish Academy of Sciences: Mathematics, 1993) and "General Mapping Approximation Problems Solving by Neural Networks and Fuzzy Inference Systems" (W. Kosiński, M. Weigl, Systems Analysis Modelling Simulation, 1998). Later on, his interests in fuzzy systems led towards developing a new fuzzy arithmetics model described in a number of papers, including "Ordered Fuzzy Numbers" (W. Kosiński, P. Prokopowicz, D. Ślȩzak, Bulletin of Polish Academy of Sciences: Mathematics, 2003) and "Evolutionary Algorithm Determining Defuzzyfication Operators" (W. Kosiński, Engineering Applications of AI, 2007), and resulting in a number of applications reported in this book.

In summary, Prof. Kosiński's research interests were characterized by true interdisciplinarity, openness to new ideas, and the ability to utilize mathematics and artificial intelligence to model and solve real-world problems. In particular, in his work he combined a strong background in mechanics and materials engineering with a good understanding of information technology applications. In our opinion, this makes his scientific achievements unique and inspiring to others.

# Scientific Collaboration

Professor Kosiński developed and maintained broad cooperation with people and scientific teams at foreign and domestic universities. He was awarded academic scholarships at the University of Iowa (the Division of Materials Engineering), the University of Bonn (the Institute of Applied Mathematics), the University of Heidelberg (the Institute of Mathematics), and the Darmstadt Technical University (the Institute of Mechanics). He was also a scholarship holder of the Alexander von Humboldt Foundation (1983–1985 and 1988).

Professor Kosiński was a visiting professor in the Laboratory Modeling in Mechanics at the University Pierre and Marie Curie in Paris (1989–1990), in the Department of Mathematics and Computer Science at Loyola University in New Orleans (1991), and in the Faculty of Science and Technology at the University Aix-Marseille III (1994–1995). In addition to France, Germany, and the United States, he visited universities in several other countries, including Italy and Japan. He also collaborated with research groups in Poland, at universities in Warsaw, Bialystok, Bydgoszcz, and Toruń, sharing his broad knowledge, international experience, and, in particular, his kindness and passion for research.

#### Teaching and Supervision

Seminars and inspiring scientific discussions conducted by Prof. Kosiński resulted in a number of joint publications and guided young researchers towards modern interdisciplinary topics, those that combined the disciplines of computer science, biology, and industry. It is worth noting that he promoted 11 Ph.D. students, as well as 148 MSc's and engineers.

He liked and valued his teaching activities. He treated students with a true respect and in a friendly manner. For almost 20 years, he shared his knowledge with students of the Faculty of Mathematics, Physics and Technology at the Kazimierz Wielki University in Bydgoszcz (formerly the Academy of Bydgoszcz), with the major of "IT Engineering" that he coestablished. For over 15 years, he gave academic classes on various IT subjects at PJAIT, where he was one of the key people forming the teaching program on AI tools and applications.

Professor Kosiński also gave advanced lectures as part of graduate and postgraduate courses on the analysis of waves, constitutive modeling of nonelastic media, and thermodynamics of continua with superficial singularities, as well as on selected issues of mathematics, artificial intelligence, and information technology, in such units as: the Institute of Fundamental Technological Research of the Polish Academy of Sciences, the University of Warsaw, the Stefan Banach's Center, the University of Iowa, and the University of Rome "La Sapienza." In the 1990s, he delivered a truly inspiring graduate course on neural networks at the Faculty of Mathematics, Informatics and Mechanics at the University of Warsaw, where he was able to put together various aspects of his background and experience to provide students with both advanced mathematical foundations and practical motivation for mastering the AI-based methodologies.

# Scientific and Social Services

An important part of Prof. Kosiński's activities was his work on editorial boards of scientific journals such as Archives of Mechanics, Engineering Transactions, Biblioteka Mechaniki Stosowanej (in Polish), Journal of Applied Mathematics and Computer Science, and Machine Graphics and Vision. He was also the editor-in-chief of the international journal, Mathematica Applicanda, published by the Polish Mathematical Society.

Professor Kosiński was also very active as a member of a number of scientific societies including the Polish Society of Theoretical and Applied Mechanics, the Polish Mathematical Society, the Association for Image Processing, the Society of Interaction of Mathematics and Mechanics, the American Mathematical Society, and Societas Humboldtiana Polonorum.

He was also involved in important scientific projects of a social character. In particular, from 2012, he was a member of the Technical Subcommittee for Mathematics and Computer Science within the Scientific Committee for independent research on the causes of the Smoleńsk Catastrophe in 2010.

#### Personality and Memoires

In his everyday professional life, Prof. Kosiński was characterized by exceptional elegance, kindliness, openness, an interest in the world, and a sense of humor. He led a busy social life and was the so-called "life and soul of the party." He actively practiced sports (e.g., tennis, diving) and was a keen dancer. Below there are several opinions of people who knew Witold Kosiński in person. This is how they remember him:

I met Prof. Witold Kosiński a dozen or so years ago. It was my privilege and honor to give lab classes to his lectures for 10 years. He liked people and was able to team up with them regardless of what they were doing. I used to discuss science with him in a train, in a car, restaurant, namely anywhere. Witold used to bring us to places and people he deemed worth it. Witold shall always be our spiritus movens, as we believe that, regardless where he is now, he still counts on us and counts with us.

> Jacek Czerniak Kazimierz Wielki University, Bydgoszcz, Poland

Witek Kosiński was an exceptional man, researcher, and above all, a friend—his warm personality and a sense of humor made him a very special man. We will miss him a lot!

> Zbigniew Michalewicz University of Adelaide, Adelaide, Australia

Professor Witold Kosiński's wide-ranging interests reached far beyond math and computer science. His scientific intuition unveiled not only basic application of the discussed issue, but also possible secondary applications, and directions for further research. He made us believe in ourselves and our ability to succeed as students, professionals, and scientists.

> Dariusz Mikołajewski Kazimierz Wielki University, Bydgoszcz, Poland

Any time I met Prof. Kosiński, I was deeply impressed by his innovative thinking, interesting and far-reaching ideas, and abilities to convey them in a highly convincing way. It is needless to say that he has made long-lasting contributions to the methodology of fuzzy sets and computing with fuzzy numbers.

> Witold Pedrycz University of Alberta, Edmonton, Canada

If you asked him for help, he always tried to find the solution which is best for you. He liked to discuss and was always open to good arguments. He understood that the discussions at the conferences are an important part of the scientist's activities.

> Piotr Prokopowicz (Former Ph.D. student) Kazimierz Wielki University, Bydgoszcz, Poland

Since we worked in the same institution, quite often we met briefly, exchanging a few words. These everyday conversations revealed the benevolent and sociable nature of Prof. Witold who gladly showed interest to others, offering his support and authority whenever it was needed. Prof. Kosiński was a man of very open mind and flexible research, an outstanding scientist but also the organizer, encouraging others to activity. He was extremely busy but at the same time constantly smiling and bursting with a sense of humor.

> Bartłomiej Starosta (Former Ph.D. student) Polish-Japanese Academy of Information Technology, Warsaw, Poland

I shall remember the Professor as a man who was always smiling, friendly and had an optimistic attitude towards the world. He was a man who could not imagine the proverbial "doing nothing." Once during my visit at the Polish-Japanese Academy of Information Technology he saw that I was sitting and doing nothing, so he quickly handed to me a copy of some lectures saying "Krzysztof! Please read it. One must not just sit doing nothing like that."

> Krzysztof Tyburek (Former Ph.D. student) Kazimierz Wielki University, Bydgoszcz, Poland

My Dad was an exceptional person. He was active in many fields, not only of scientific nature. He was interested in politics, sport, followed international news, and traveled a lot with Mum. I could talk with him about economics, methods of valuation, and corporate finance. He also liked spending free time actively, so I learned and practiced skiing with him, I took part in numerous canoeing weekends, and I played tennis. He had been learning throughout his entire life, despite all the academic titles which he held.

That's how I shall remember him.

W. Konrad Kosiński Warsaw, Poland

# Acknowledgements

The open access publication of this monograph, including reviewing, digitalization, and translation, was financed by the Polish Ministry of Science and Higher Education in accordance with 542/P-DUN/2016 dated September 22, 2016 and intended for activities promoting science.

# Contents

#### Part I Background of Fuzzy Set Theory




# **Part I Background of Fuzzy Set Theory**

# **Chapter 1 Introduction to Fuzzy Sets**

**Michal Jezewski, Robert Czabanski and Jacek Leski**

**Abstract** The subject of this chapter is fuzzy sets and the basic issues related to them. The first section discusses concepts of sets: classic and fuzzy, and presents various ways of describing fuzzy sets. The second section is dedicated to *t*-norms, *s*-norms, and other terms associated with fuzzy sets. Subsequent sections describe the extension principle, fuzzy relations and their compositions, cylindrical extension and projection of a fuzzy set. The sixth section discusses fuzzy numbers and basic arithmetic operations on them. Finally, the last section summarizes the chapter.

#### **1.1 Classic and Fuzzy Sets**

The concept of a classic set is one of primitive notions, which do not have a definition. Most frequently a set is understood as a collection of objects (elements) having some features distinguishing them from other objects, such as the set of positive numbers less than 100 or the set of aquatic birds. Usually, sets are denoted in uppercase (e.g., a set *A*, *B*, ...), whereas objects are in lowercase (e.g., an object *x*, *y*, ...). Each set may be considered as a subset of an universe of discourse X, which is a "super-set" containing all possible objects.

In the case of classic sets, a given object *x* may belong to a set *A* (be a member of a set *A*), or not belong to this set (not be a member of this set), and these two options are denoted by *x* ∈ *A* or *x* ∈/ *A*. A classic set may be described by means of the characteristic function (χ*A*) that takes two values: 1 (for the object belonging to a set *A*), and 0 (for the object not belonging to a set *A*) [19]

M. Jezewski (B) · R. Czabanski · J. Leski

Institute of Electronics, Silesian University of Technology, 16 Akademicka Str., 44-100 Gliwice, Poland e-mail: michal.jezewski@polsl.pl

R. Czabanski e-mail: robert.czabanski@polsl.pl

J. Leski e-mail: jacek.leski@polsl.pl

$$\chi\_A(\mathbf{x}) = \begin{cases} 1, \ x \in A, \\ 0, \ x \notin A. \end{cases} \tag{1.1}$$

There are several operations defined on classic sets and the following are considered to be basic ones [19]:

• product (intersection, conjunction)

$$A \cap B = \{ \mathbf{x} \in \mathbb{X} | \mathbf{x} \in A \text{ and } \mathbf{x} \in B \}, \tag{1.2}$$

• sum (union, disjunction)

$$A \cup B = \{ \mathbf{x} \in \mathbb{X} | \mathbf{x} \in A \text{ or } \mathbf{x} \in B \},\tag{1.3}$$

• negation (complement)

$$\overline{A} = \{ \mathbf{x} \in \mathbb{X} | \mathbf{x} \notin A \}. \tag{1.4}$$

The above operations can also be defined on the basis of characteristic functions [19]:

$$\chi\_{A\cap B} = \chi\_A\left(\mathbf{x}\right) \wedge \chi\_B\left(\mathbf{x}\right) = \min\left(\chi\_A\left(\mathbf{x}\right), \chi\_B\left(\mathbf{x}\right)\right),\tag{1.5}$$

$$\chi\_{A\cup B} = \chi\_A\left(\mathbf{x}\right) \vee \chi\_B\left(\mathbf{x}\right) = \max\left(\chi\_A\left(\mathbf{x}\right), \chi\_B\left(\mathbf{x}\right)\right),\tag{1.6}$$

$$
\overline{\chi\_A(\mathbf{x})} = 1 - \chi\_A(\mathbf{x})\,. \tag{1.7}
$$

*Example 1.1* Let us consider the expression "The fetal heart rate (FHR) is about 120 bpm," which can be described by the classic set of FHR values in the interval, for example,[115, 125], defined in the universe <sup>X</sup> <sup>=</sup> [0, 240] <sup>⊂</sup> <sup>R</sup>. The characteristic function of this set is shown in Fig. 1.1a. According to the proposed interval, values 121 and 125 equally belong to this set, whereas values 125.1, 130, and 135 equally do not belong. However, the following observations can arise: a value 121 is closer to 120 than 125, thus it should belong "stronger", a value 125.1 should be the member of the set similarly as 125, and finally, a value 135 should belong "less" than 130. Fuzzy sets allow for taking into account these observations.

Fuzzy sets were introduced and described using membership functions by L.A. Zadeh in 1965 [24] and have many practical applications [10, 22]. As opposed to a classic set, in the case of a fuzzy set *A* an object *x* may belong to this set with varying membership degrees in the range [0, 1], where 0 and 1 denote, respectively, lack of membership and full membership.

One way of describing a fuzzy set *A* is to provide its membership function μ*<sup>A</sup>* : <sup>X</sup> → [0, <sup>1</sup>]. There are various membership functions, three of them are presented below [5, 16].

#### 1 Introduction to Fuzzy Sets 5

• Gaussian membership function (where *c* and δ are parameters)

$$
\mu\_A\left(\mathbf{x}; c, \delta\right) = \exp\left(-\frac{\left(\mathbf{x} - c\right)^2}{2\delta^2}\right). \tag{1.8}
$$

The parameter *c* specifies the center of a function; the parameter δ determines its dispersion.

• Trapezoidal membership function (where *p* ≤ *q* ≤ *r* ≤ *s* are parameters)

$$\mu\_A\left(x;\,p,q,r,s\right) = \begin{cases} 0, & x \le p, \\ \frac{x-p}{q-p}, & p < x \le q, \\ 1, & q < x \le r, \\ \frac{x-x}{s-r}, & r < x \le s, \\ 0, & x > s. \end{cases} \tag{1.9}$$

A special case of a trapezoidal function (for *q* = *r*) is a triangular function.

• Singleton (where *x*<sup>0</sup> is a parameter)

$$
\mu\_A \left( \mathbf{x}; \mathbf{x}\_0 \right) = \delta\_{\mathbf{x}, \mathbf{x}\_0} = \begin{cases} 1, & \mathbf{x} = \mathbf{x}\_0, \\ 0, & \mathbf{x} \neq \mathbf{x}\_0. \end{cases} \tag{1.10}
$$

The parameter *x*<sup>0</sup> specifies the location of the singleton, that is, the single value of *x* which belongs to a set *A* (with a membership degree equal to 1).

An example of the Gaussian membership function is presented in Fig. 1.1b, and trapezoidal, triangular, and singleton functions are illustrated in Fig. 1.2.

**Fig. 1.1** "The fetal heart rate is about 120 bpm": **a** the characteristic function of the classic set, **b** the Gaussian membership function of the fuzzy set

**Fig. 1.2** Examples of membership functions: **a** trapezoidal (*p* = 100, *q* = 120,*r* = 140,*s* = 160), **b** triangular (*p* = 110, *q* = *r* = 120,*s* = 130) and **c** singleton (*x*<sup>0</sup> = 120)

*Example 1.2* In the universe <sup>X</sup> <sup>=</sup> [0, 240] <sup>⊂</sup> <sup>R</sup> let us define the fuzzy set *<sup>A</sup>* "The FHR is about 120 bpm." Such a set can be described by the Gaussian membership function (1.8) with *c* = 120 and δ = 4.25, which is shown in Fig. 1.1b. In this case, in accordance with observations in Example 1.1, the FHR values discussed (121, 125, 125.1, 130, 135) belong to this set with different membership degrees: μ*<sup>A</sup>* (121) = 0.973, μ*<sup>A</sup>* (125) = 0.500, μ*<sup>A</sup>* (125.1) = 0.486, μ*<sup>A</sup>* (130) = 0.062 and μ*<sup>A</sup>* (135) = 0.002.

*Example 1.3* One more example concerning fetal heart rate can be the expression "normal FHR," which means that the FHR value is in the physiological range. Based on FIGO guidelines, as the range of "normal FHR" values we can assume [110, 150] bpm and use the classic set of values in this range to describe the expression "normal FHR." However, this leads to the situation in which FHR value 151 bpm is not "normal," although it seems that it partially is. It suggests that it is better to use a fuzzy set to describe the expression "normal FHR."

*Example 1.4* Another example can be the expression "new car." Assuming that a car is "new" when its age does not exceed three years, the expression "new car" can be described by the classic set of cars up to the age of three years. However, it results in a problem similar to the previous example: the car at the age of three years and one week is not "new," although it seems that it almost is. Also in this case it is better to use a fuzzy set.

The above examples suggest that fuzzy sets are a good tool for a formal description of vague and imprecise expressions such as "value about 120," "normal FHR," "new car," "medium height," "high salary," and so on. Examples of membership functions shown in Fig. 1.2 could be used to describe expressions such as: (a) "normal FHR," (b) the value of FHR is "about 120 bpm," and (c) FHR value is "exactly 120 bpm."

#### 1 Introduction to Fuzzy Sets 7

Another way of describing a fuzzy set is to list ordered pairs: an object *x* and its membership degree μ*<sup>A</sup>* (*x*) ∈ [0, 1] in a set *A* [5]

$$A = \{ (\mathbf{x}, \mu\_A(\mathbf{x})) | \mathbf{x} \in \mathbb{X} \}. \tag{1.11}$$

To describe a fuzzy set, the notation proposed by Zadeh [25] can also be used:

• for discrete universe <sup>X</sup> (comprising ordered or nonordered objects)

$$A = \sum\_{\mathbf{x} \in \mathcal{X}} \mu\_A(\mathbf{x}) / \mathbf{x},\tag{1.12}$$

• for indiscrete universe <sup>X</sup>

$$A = \int\_X \mu\_A(\mathbf{x}) \, / \mathbf{x}. \tag{1.13}$$

In the above notation the symbol / is a separator, and symbols  and denote idempotent summation.

*Example 1.5* In the discrete nonordered universe comprising selected fruits <sup>X</sup> <sup>=</sup> {*orange*, *pineapple*, *grape*, *apple*, *peach*, *banana*, *grapef ruit*}let us define the fuzzy set *A* "Fruits, that the first author likes." Using the notation proposed by Zadeh we can write

*A* = 1.0/*orange* + 0.6/*pineapple* + 0.2/*grape* + 1.0/*apple* + 0.8/*peach* +0.6/*banana* + 0.5/*grapef ruit*.

*Example 1.6* Let us consider the discrete ordered universe comprising values of possible temperatures to set in a car air-conditioning system <sup>X</sup> <sup>=</sup> {*lo*w, <sup>18</sup>, <sup>19</sup>,..., <sup>23</sup> <sup>24</sup>, *high*} <sup>⊂</sup> <sup>R</sup>+, where "*lo*w" and "*high*" mean the lowest and the highest attainable temperatures. Using the notation of ordered pairs, the fuzzy set *A* "Adequate (according to the second author) temperature in the car" defined in the universe X can be described as follows

*A*= {(*lo*w, 0.1),(18, 0.4),(19, 0.5),(20, 0.8),(21, 0.9),(22, 1.0),(23, 0.8), (24, 0.4),(*high*, 0.1)}.

*Example 1.7* The set of FHR values from Example 1.2 using the notation proposed by Zadeh is described as

$$A = \int\_{\mathbb{R}} \exp\left(-\frac{\left(\mathbf{x} - 120\right)^2}{2 \cdot \left(4.25\right)^2}\right) \Big/ \left.\mathbf{x}\right|$$

Various extensions of fuzzy sets were proposed, for example, fuzzy sets of type-2 [26], interval-valued fuzzy sets [8, 11, 21, 26], probabilistic sets [9], rough sets [18], and intuitionistic fuzzy sets [2].

#### **1.2 Fuzzy Sets—Basic Definitions**

Similarly to classic sets, operations of product, sum, and complement are also established for fuzzy sets. Product and sum are defined by means of operators of *t*-norm and *s*-norm:

$$\mathop{\mathsf{W}}\_{\mathbf{x}\in\mathbb{X}}\mu\_{A\cap B}\left(\mathbf{x}\right) = \mu\_{A}\left(\mathbf{x}\right)\star\_{T}\mu\_{B}\left(\mathbf{x}\right) = T\left(\mu\_{A}\left(\mathbf{x}\right), \mu\_{B}\left(\mathbf{x}\right)\right),\tag{1.14}$$

$$\mathop{\Psi}\_{\mathbf{x}\in\mathbb{X}}\mu\_{A\cup B}\left(\mathbf{x}\right) = \mu\_{A}\left(\mathbf{x}\right)\star\_{\mathcal{S}}\mu\_{B}\left(\mathbf{x}\right) = \mathcal{S}\left(\mu\_{A}\left(\mathbf{x}\right), \mu\_{B}\left(\mathbf{x}\right)\right),\tag{1.15}$$

where *<sup>T</sup>* (*T* ) and *<sup>S</sup>* (*S*) are operators of *t*-norm and *s*-norm. Both *t*-norm and *s*-norm (also called *t*-conorm) are mappings [0, 1]×[0, 1]→[0, 1] that satisfy all necessary conditions [5, 16] presented in Table 1.1.

There are various *t*-norms and *s*-norms [5, 7, 13, 16, 23, 24, 27], three that are frequently used are presented below.

• Zadeh *t*-norm and *s*-norm:

$$\mathbf{x} \star\_T \mathbf{y} = \min(\mathbf{x}, \mathbf{y}) = \mathbf{x} \wedge \mathbf{y}, \quad \mathbf{x} \star\_S \mathbf{y} = \max(\mathbf{x}, \mathbf{y}) = \mathbf{x} \vee \mathbf{y}. \tag{1.16}$$

• Algebraic product and algebraic (also called probabilistic) sum:

$$\mathbf{x} \star\_T \mathbf{y} = \mathbf{x} \mathbf{y}, \quad \mathbf{x} \star\_S \mathbf{y} = \mathbf{x} + \mathbf{y} - \mathbf{x} \mathbf{y}. \tag{1.17}$$

• Lukasiewicz *t*-norm and *s*-norm:

$$\mathbf{x} \star\_{T} \mathbf{y} = \max \left( \mathbf{x} + \mathbf{y} - 1, \mathbf{0} \right), \quad \mathbf{x} \star\_{\mathbb{S}} \mathbf{y} = \min \left( \mathbf{x} + \mathbf{y}, 1 \right). \tag{1.18}$$

The complement of a fuzzy set *A* is defined as follows [5, 16]

$$
\mu\_{\overline{A}}(\mathbf{x}) = n \left[ \mu\_A(\mathbf{x}) \right], \tag{1.19}
$$

where *n* denotes a negation function. Minimal assumptions about the function *n* are: *n* is a mapping [0, 1]→[0, 1], *n* satisfies conditions *n*(0) = 1, *n*(1) = 0, and *n* is

**Table 1.1** Necessary conditions for *t*-norms and *s*-norms: A1 denotes boundary conditions, A2 commutativity, A3-monotonicity, and A4-associativity (*r*, *u*, *x*, *y*,*z* ∈ [0, 1])


**Fig. 1.3** Product, sum, and complement of fuzzy sets: **a** fuzzy sets *A* and *B*, **b** the product of *A* and *B* using Zadeh *t*-norm (minimum), **c** the sum of *A* and *B* using Zadeh *s*-norm (maximum), **d** complement of a set *A* using the standard negation

nonincreasing. Depending on specific conditions [5, 16], a negation function can be strict or strong. The strong negation in the form *N* (*x*) = 1 − *x* (a standard negation) is most frequently used. Operations of product, sum, and complement are illustrated in Fig. 1.3.

In addition to definitions of *t*-norms and *s*-norms, other concepts that also characterize fuzzy sets are defined [3, 5–7, 16, 20, 23, 27]. Some of them are discussed below.

• An α-cut set (*A*α) and a strong α-cut set (*A*α)

$$A\_{\mathfrak{a}} = \{ \mathbf{x} \in \mathbb{X} | \mu\_A(\mathbf{x}) \ge \mathfrak{a} \}, \qquad A\_{\underline{\mathfrak{a}}} = \{ \mathbf{x} \in \mathbb{X} | \mu\_A(\mathbf{x}) > \mathfrak{a} \}.\tag{1.20}$$


$$\text{Crossover}\left(A\right) = \left\{\mathbf{x} \in \mathbb{X} \, \middle| \, \mu\_A\left(\mathbf{x}\right) = \frac{1}{2}\right\}.\tag{1.21}$$


$$\mathop{\mathsf{V}}\_{\mathbf{x}\_{1},\mathbf{x}\_{2}\in\mathsf{X}}\limits\_{\lambda\in\{0,1\}}\mu\_{A}\left[\lambda\mathbf{x}\_{1}+\left(1-\lambda\right)\mathbf{x}\_{2}\right]\geq\min\left[\mu\_{A}\left(\mathbf{x}\_{1}\right),\mu\_{A}\left(\mathbf{x}\_{2}\right)\right].\tag{1.22}$$

• Two fuzzy sets *A* and *B* are equal iff

$$\mathop{\mathsf{H}}\_{\mathbf{x}\in\mathbb{X}}\,\,\mu\_{A}\left(\mathbf{x}\right)=\mu\_{B}\left(\mathbf{x}\right).\tag{1.23}$$

• A fuzzy set *A* is a subset of a fuzzy set *B* iff

$$\mathop{\mathsf{H}}\_{\mathbf{x}\in\mathbb{X}}\mu\_{A}\left(\mathbf{x}\right)\leq\mu\_{B}\left(\mathbf{x}\right).\tag{1.24}$$

Core(*A*), Supp(*A*), Width(*A*), and Crossover(*A*) are illustrated in Fig. 1.4. It is worth noting that Core(*A*) and Supp(*A*) specify classic sets (χ*Core*(*<sup>A</sup>*)(*x*) and χ*Supp*(*<sup>A</sup>*)(*x*) in Fig. 1.4 denote their characteristic functions).

**Fig. 1.4** The illustration of core, support, width, and crossover points of a fuzzy set

#### **1.3 Extension Principle**

The extension principle [26] allows for extension of the concept of mathematical functions (defined on classic sets) to fuzzy sets. In other words, mapping from a classic set to a classic set is extended to mapping from a fuzzy set to a fuzzy set.

Let *<sup>y</sup>* <sup>=</sup> *<sup>f</sup>* (*x*) be a one-argument function, which is mapping from <sup>X</sup> to <sup>Y</sup>, and *<sup>A</sup>* be a fuzzy set defined in a discrete universe <sup>X</sup> <sup>=</sup> *x*1, *x*2,..., *x <sup>p</sup>* 

$$A = \mu\_A \left( \mathbf{x}\_1 \right) / \mathbf{x}\_1 + \mu\_A \left( \mathbf{x}\_2 \right) / \mathbf{x}\_2 + \dots + \mu\_A \left( \mathbf{x}\_p \right) / \mathbf{x}\_p. \tag{1.25}$$

As a result of mapping a set *A* by the function *f* we obtain the following fuzzy set *B* (defined in the universe Y) [16]

$$B = f\left(A\right) = \mu\_A\left(\mathbf{x}\_1\right)/f\left(\mathbf{x}\_1\right) + \mu\_A\left(\mathbf{x}\_2\right)/f\left(\mathbf{x}\_2\right) + \dots + \mu\_A\left(\mathbf{x}\_p\right)/f\left(\mathbf{x}\_p\right),\tag{1.26}$$

where + denotes a logical sum. For functions that are not injective (are not one-to-one mappings), a logical sum is performed using *s*-norm, and hence we can write [16]

$$\mu\_{\mathcal{B}}\left(\mathbf{y}\right) = \begin{cases} \star\_{\mathcal{S}} & \mu\_{A}\left(\mathbf{x}\right), \quad f^{-1}\left(\mathbf{y}\right) \neq \emptyset, \\ \mathbf{0}, & f^{-1}\left(\mathbf{y}\right) = \emptyset, \end{cases} \tag{1.27}$$

where -*<sup>S</sup>* stands for a multiargument *s*-norm, and *f* <sup>−</sup><sup>1</sup> (*y*) denotes the domain of function *y* = *f* (*x*).

*Example 1.8* Suppose we have a fuzzy set *<sup>A</sup>* defined in the discrete universe <sup>X</sup> <sup>=</sup> {−3, <sup>−</sup>2,..., <sup>3</sup>, <sup>4</sup>} <sup>⊂</sup> <sup>R</sup>

*A* = {(*x*<sup>1</sup> = −3, 0.8),(*x*<sup>2</sup> = −2, 0.5),(*x*<sup>3</sup> = −1, 0.3),(*x*<sup>4</sup> = 0, 0.5),

(*x*<sup>5</sup> = 1, 0.8),(*x*<sup>6</sup> = 2, 0.1),(*x*<sup>7</sup> = 3, 0.8),(*x*<sup>8</sup> = 4, 0.7)},

and the function *<sup>y</sup>* <sup>=</sup> *<sup>f</sup>* (*x*) <sup>=</sup> <sup>2</sup>*<sup>x</sup>* 4, which is the mapping from <sup>X</sup> to <sup>Y</sup>. Let us determine the mapping of *A* by the function *f* to the fuzzy set *B*.

Values of the function *f* arranged in ascending order are

*f* (*x*4) = 0, *f* (*x*3) = *f* (*x*5) = 2, *f* (*x*2) = *f* (*x*6) = 32, *f* (*x*1) = *f* (*x*7) = 162, *f* (*x*8) = 512.

Using (1.27) and Zadeh *s*-norm (maximum), the fuzzy set *B* is determined in the following way

*B* = {(0, 0.5),(2, max (0.3, 0.8)),(32, max (0.5, 0.1)),(162, max (0.8, 0.8)), (512, 0.7)} = {(0, 0.5),(2, 0.8),(32, 0.5),(162, 0.8),(512, 0.7)}.

The above description concerned a one-argument function. Now let us consider a general case, a multiargument function *y* = *f* (*x*1, *x*2,..., *xn*), which is a mapping from <sup>X</sup><sup>1</sup> <sup>×</sup> <sup>X</sup><sup>2</sup> ×···× <sup>X</sup>*<sup>n</sup>* to <sup>Y</sup>. Suppose we have fuzzy sets *<sup>A</sup>*1, *<sup>A</sup>*2,..., *An*, defined in universes X1, X2,..., X*n*, respectively. The mapping of these sets by the function *f* leads to the following fuzzy set *B* (defined in universe Y) [16]

12 M. Jezewski et al.

$$\mu\_B \left( \mathbf{y} \right) = \begin{cases} \star\_S & \left[ \mu\_{A\_1} \left( \mathbf{x}\_1 \right) \star\_T \cdots \star\_T \mu\_{A\_n} \left( \mathbf{x}\_n \right) \right], \quad f^{-1} \left( \mathbf{y} \right) \neq \emptyset, \\ 0, & f^{-1} \left( \mathbf{y} \right) = \emptyset. \end{cases} \tag{1.28}$$

#### **1.4 Fuzzy Relations**

A generalization of the concept of a fuzzy set is the idea of a fuzzy relation [26]. Let us consider a two-dimensional (binary) fuzzy relation *R*, which can be described by the set of ordered pairs: two objects *x* and *y*, and the membership degree μ*<sup>R</sup>* (*x*, *y*). It can be written as [5, 16]

$$\mathcal{R} = \{ [(\mathbf{x}, \mathbf{y}), \mu\_{\mathcal{R}}(\mathbf{x}, \mathbf{y})] | \mathbf{x} \in \mathbb{X}, \mathbf{y} \in \mathbb{Y} \}. \tag{1.29}$$

The membership degree μ*<sup>R</sup>* (*x*, *y*) can be understood as the degree of relationship between objects *x* and *y*; the higher the value of μ*<sup>R</sup>* (*x*, *y*), the greater is the degree of relationship. The membership degree μ*<sup>R</sup>* (*x*, *y*) is the value of membership function <sup>μ</sup>*<sup>R</sup>* : <sup>X</sup> <sup>×</sup> <sup>Y</sup> → [0, <sup>1</sup>] of fuzzy relation *<sup>R</sup>*. The presented two-dimensional fuzzy relation is also a two-dimensional fuzzy set defined in an universe <sup>X</sup> <sup>×</sup> <sup>Y</sup>.

*Example 1.9* In universes <sup>X</sup> <sup>=</sup> <sup>Y</sup> = [100, <sup>160</sup>] ⊂ <sup>R</sup><sup>+</sup> let us define the twodimensional fuzzy relation *R* "Two FHR values (*x* and *y*) differ significantly." As the membership function of such a relation we can assume

$$
\mu\_R(\mathbf{x}, \mathbf{y}) = 1 - \exp\left(-\frac{(\mathbf{x} - \mathbf{y})^2}{2\delta^2}\right),
$$

which for parameter δ = 0.2 is shown in Fig. 1.5.

*Example 1.10* Let us consider two discrete universes: <sup>X</sup> <sup>=</sup> {3500, <sup>4000</sup>, <sup>4500</sup>, <sup>5000</sup>} <sup>⊂</sup> <sup>R</sup><sup>+</sup> and <sup>Y</sup> <sup>=</sup> {2000, <sup>3000</sup>, <sup>3500</sup>, <sup>5000</sup>, <sup>5500</sup>} <sup>⊂</sup> <sup>R</sup>+, comprising possible salaries in companies *<sup>A</sup>* and *<sup>B</sup>*, respectively. In universe <sup>X</sup> <sup>×</sup> <sup>Y</sup> we can define the following fuzzy relation "The salary of an employee *x* in a company *A* is similar to the salary of an employee *y* in a company *B*."

A relation defined in discrete universes can be described by a relation matrix. In this case it is as follows

$$
\mathcal{R} = \begin{bmatrix}
0.32 & 0.88 & 1.00 & 0.32 & 0.14 \\
0.14 & 0.61 & 0.88 & 0.61 & 0.32 \\
0.04 & 0.32 & 0.61 & 0.88 & 0.61 \\
0.01 & 0.14 & 0.32 & 1.00 & 0.88
\end{bmatrix},
$$

where rows correspond to elements of the universe X, and columns to elements of the universe Y. In other words, the element *R*(*i*, *j*) determines the degree of relationship between the *i*th object in X and the *j*th object in Y.

In general, a multidimensional fuzzy relation is defined as follows [5, 16]

$$\mathcal{R} = \{ \left[ \left( \mathbf{x}\_1, \mathbf{x}\_2, \dots, \mathbf{x}\_n \right), \mu\_{\mathcal{R}} \left( \mathbf{x}\_1, \mathbf{x}\_2, \dots, \mathbf{x}\_n \right) \right] \mid \mathbf{x}\_1 \in \mathbb{X}\_1, \mathbf{x}\_2 \in \mathbb{X}\_2, \dots, \mathbf{x}\_n \in \mathbb{X}\_n \}, \quad (1.50)$$

where <sup>μ</sup>*<sup>R</sup>* : <sup>X</sup><sup>1</sup> <sup>×</sup> <sup>X</sup><sup>2</sup> ×···× <sup>X</sup>*<sup>n</sup>* → [0, <sup>1</sup>] is a membership function of an *<sup>n</sup>*-dimensional fuzzy relation *R*, that is, of an *n*-dimensional fuzzy set defined in universe <sup>X</sup><sup>1</sup> <sup>×</sup> <sup>X</sup><sup>2</sup> ×···× <sup>X</sup>*n*.

Because fuzzy relations are fuzzy sets, they are subject to the same operations as fuzzy sets, for example, the product of sets or an α-cut set. Additionally, fuzzy relations may be composed. Let *<sup>R</sup>*<sup>1</sup> and *<sup>R</sup>*<sup>2</sup> be relations defined in universes <sup>X</sup> <sup>×</sup> <sup>Y</sup> and <sup>Y</sup> <sup>×</sup> <sup>Z</sup>, respectively. Frequently used compositions are "supremum-*t*-norm" (*R*<sup>1</sup> ◦ *R*2) and "infimum-*s*-norm" (*R*<sup>1</sup> • *R*2), leading to the relation defined in an universe <sup>X</sup> <sup>×</sup> <sup>Z</sup> [16]:

$$\mu\_{\mathcal{R}\_{\mathbb{I}}\circ\mathcal{R}\_{\mathbb{I}}}(\mathbf{x},\mathbf{z}) = \sup\_{\mathbf{y}\in\mathbb{Y}} \Big[\mu\_{\mathcal{R}\_{\mathbb{I}}}(\mathbf{x},\mathbf{y}) \star\_{T} \mu\_{\mathcal{R}\_{\mathbb{I}}}(\mathbf{y},\mathbf{z})\Big],\tag{1.31}$$

$$\mu\_{\mathcal{R}\_{\mathbf{l}}\bullet\mathcal{R}\_{\mathbf{2}}}(\mathbf{x},\mathbf{z}) = \inf\_{\mathbf{y}\in\mathbb{Y}} \left[\mu\_{\mathcal{R}\_{\mathbf{l}}}(\mathbf{x},\mathbf{y}) \star\_{\mathcal{S}} \mu\_{\mathcal{R}\_{\mathbf{2}}}(\mathbf{y},\mathbf{z})\right].\tag{1.32}$$

For relations described by relation matrices, the above compositions can be achieved by multiplication of matrices with multiplication of elements replaced by *t*-norm (or*s*-norm), and the adding of elements replaced by maximum (or minimum).

*Example 1.11* Suppose we have two fuzzy relations: *R*<sup>1</sup> and *R*<sup>2</sup> defined in discrete universes <sup>X</sup> <sup>=</sup> {*x*1, *<sup>x</sup>*2, *<sup>x</sup>*3} <sup>×</sup> <sup>Y</sup> <sup>=</sup> {*y*1, *<sup>y</sup>*2} and <sup>Y</sup> <sup>=</sup> {*y*1, *<sup>y</sup>*2} <sup>×</sup> <sup>Z</sup> <sup>=</sup> {*z*1,*z*2,*z*3}, respectively, which are described by relational matrices:

$$R\_1 = \begin{bmatrix} 0.5 & 0.2 \\ 0.1 & 1.0 \\ 0.6 & 0.5 \end{bmatrix}, \qquad R\_2 = \begin{bmatrix} 0.5 & 0.7 & 0.2 \\ 1.0 & 0.2 & 0.8 \end{bmatrix}.$$

The composition "maximum-*t*-norm" (*R*<sup>1</sup> ◦ *R*2) with Zadeh *t*-norm (minimum) leads to the following relation

$$R\_1 \diamond R\_2 = \begin{bmatrix} 0.5 & 0.5 & 0.2 \\ 1.0 & 0.2 & 0.8 \\ 0.5 & 0.6 & 0.5 \end{bmatrix},$$

where, for example, element (1, 1) was determined as

max (min (0.5, 0.5), min (0.2, 1.0)) = max (0.5, 0.2) = 0.5.

#### **1.5 Cylindrical Extension and Projection of a Fuzzy Set**

When analyzing fuzzy sets (fuzzy relations) defined in universes of different dimensionality, sometimes there is a need to increase or reduce dimensionality of one of the sets (one of the relations). To increase or reduce dimensionality, operations of cylindrical extension and projection were defined [26].

Cylindrical extension of a fuzzy set *A* leads to a fuzzy set (denoted by Ce(*A*)) of higher dimensionality. Let us assume we have a fuzzy set *A* defined in a onedimensional universe <sup>X</sup>. Its cylindrical extension in two-dimensional universe <sup>X</sup> <sup>×</sup> <sup>Y</sup> is defined as [16]

$$\mathop{\mathsf{h}}\_{\mathbf{x}\in\mathsf{X},\mathbf{y}\in\mathsf{Y}}\mu\_{\mathsf{Ce}(A)}\left(\mathbf{x},\mathbf{y}\right)=\mu\_{A}\left(\mathbf{x}\right),\tag{1.33}$$

and is illustrated in Fig. 1.6a, which shows the cylindrical extension of the fuzzy set *<sup>A</sup>* from Example 1.2 in the universe <sup>X</sup> <sup>×</sup> <sup>Y</sup>, where <sup>Y</sup> <sup>=</sup> [0, 50] <sup>⊂</sup> <sup>R</sup>.

*Example 1.12* Let us consider the cylindrical extension of the fuzzy set *A* from Example 1.6; that is,

*A*= {(*lo*w, 0.1),(18, 0.4),(19, 0.5),(20, 0.8),(21, 0.9),(22, 1.0),(23, 0.8), (24, 0.4),(*high*, 0.1)},

in the universe <sup>X</sup> <sup>×</sup> <sup>Y</sup>, where <sup>Y</sup> <sup>=</sup> {1, <sup>2</sup>} <sup>⊂</sup> <sup>R</sup>+. Using (1.33) the following fuzzy set is obtained

Ce(*A*)=0.1/ (*lo*w, 1) +0.4/ (18, 1) +0.5/ (19, 1) +0.8/ (20, 1) +0.9/ (21, 1) + +1.0/ (22, 1) + 0.8/ (23, 1) + 0.4/ (24, 1) + 0.1/ (*high*, 1) +

+0.1/ (*lo*w, 2) + 0.4/ (18, 2) + 0.5/ (19, 2) + 0.8/ (20, 2) + 0.9/ (21, 2) +

+1.0/ (22, 2) + 0.8/ (23, 2) + 0.4/ (24, 2) + 0.1/ (*high*, 2).

In general, let us assume we have a fuzzy set *A* defined in an *m*-dimensional universe <sup>X</sup> <sup>=</sup> <sup>X</sup><sup>1</sup> <sup>×</sup> <sup>X</sup><sup>2</sup> ×···× <sup>X</sup>*m*. The cylindrical extension of *<sup>A</sup>* in an *<sup>m</sup>* <sup>+</sup> *<sup>n</sup>*dimensional universe XY <sup>=</sup> <sup>X</sup> <sup>×</sup> <sup>Y</sup>, where <sup>Y</sup> <sup>=</sup> <sup>Y</sup><sup>1</sup> <sup>×</sup> <sup>Y</sup><sup>2</sup> ×···× <sup>Y</sup>*n*, is defined as [16]

**Fig. 1.6** Cylindrical extension (**a**) and projection of a fuzzy set (**b**)

$$\mathop{\mathsf{V}}\_{\underline{\underline{\chi}\_{XY}\in\underline{\underline{X}Y}}} \mu\_{\mathrm{Ce}(A)}\left(\underline{\underline{\chi}\_{XY}}\right) = \mu\_{A}\left(\underline{\underline{\chi}\_{X}}\right),\tag{1.34}$$

where *<sup>x</sup> XY* and *<sup>x</sup> <sup>X</sup>* denote objects from universes XY and <sup>X</sup>, respectively.

Projection of a fuzzy set [26] leads to fuzzy sets of lower dimensionality. For example, let us consider a fuzzy set *<sup>A</sup>* defined in a two-dimensional universe <sup>X</sup> <sup>×</sup> <sup>Y</sup> and described by the membership function presented in Fig. 1.6b. As a result of its projection in universes X and Y we can obtain two fuzzy sets [16]:

$$\mathop{\Psi}\_{\mathbf{x}\in\mathcal{X}}\mu\_{\operatorname{Proj}\_{\mathcal{X}}(A)}\left(\mathbf{x}\right) = \sup\_{\mathbf{y}\in\mathcal{Y}}\mu\_{A}\left(\mathbf{x},\mathbf{y}\right),\tag{1.35}$$

and

$$\mathop{\mathsf{T}}\_{\mathbf{y}\in\mathbb{Y}}\mu\_{\text{Proj}\_{\mathbf{Y}}(A)}\left(\mathbf{y}\right) = \sup\_{\mathbf{x}\in\mathbb{X}}\mu\_{A}\left(\mathbf{x},\mathbf{y}\right),\tag{1.36}$$

which are also illustrated in Fig. 1.6b.

*Example 1.13* In Example 1.11, the fuzzy relation *<sup>R</sup>*<sup>1</sup> defined in the universe <sup>X</sup> <sup>=</sup> {*x*1, *<sup>x</sup>*2, *<sup>x</sup>*3} <sup>×</sup> <sup>Y</sup> <sup>=</sup> {*y*1, *<sup>y</sup>*2} was presented

$$\mathcal{R}\_1 = \begin{bmatrix} 0.5 \ 0.2 \\ 0.1 \ 1.0 \\ 0.6 \ 0.5 \end{bmatrix}.$$

As a result of its projection in universes X and Y, according to (1.35) and (1.36) the following fuzzy sets can be obtained.

Proj<sup>X</sup> (*R*1) = max (0.5, 0.2) /*x*<sup>1</sup> + max (0.1, 1.0) /*x*<sup>2</sup> + max (0.6, 0.5) /*x*<sup>3</sup> = = 0.5/*x*<sup>1</sup> + 1.0/*x*<sup>2</sup> + 0.6/*x*3, Proj<sup>Y</sup> (*R*1) = max (0.5, 0.1, 0.6) /*y*1+ max (0.2, 1.0, 0.5) /*y*<sup>2</sup> = 0.6/*y*1+1.0/*y*2.

In general, let us assume we have a fuzzy set *A* defined in an (*m* + *n*)-dimensional universe XY <sup>=</sup> <sup>X</sup> <sup>×</sup> <sup>Y</sup>. Its projection in an *<sup>m</sup>*-dimensional universe <sup>X</sup> is defined as [16]

$$\mathop{\mathsf{W}}\_{\underline{\chi}\_{X}\in\underline{\chi}\_{}}\mu\_{\text{Proj}\_{\underline{\chi}}(A)}\left(\underline{\chi}\_{X}\right) = \sup\_{\underline{\chi}\_{Y}\in\underline{\chi}\_{}}\mu\_{A}\left(\underline{\chi}\_{XY}\right),\tag{1.37}$$

where *<sup>x</sup> <sup>X</sup>* , *xY* , and *<sup>x</sup> XY* denote objects from universes <sup>X</sup>, <sup>Y</sup>, and XY, respectively.

#### **1.6 Fuzzy Numbers**

A separate class of fuzzy sets for describing imprecise expressions related to numbers (such as "about 5," "more or less 10," etc.) is distinguished [26]. Such sets are called fuzzy numbers and denoted by *A* , *<sup>B</sup>*, ... [16]. Usually, fuzzy numbers are regarded as fuzzy sets that are defined over the real axis and fulfill given conditions; for example, they are normal, compactly supported, and in some sense convex [15].

Basic operations on fuzzy numbers *A* and *<sup>B</sup>* can be defined based on the extension principle in the following way [16]:

• addition

$$\mu\_{\tilde{A}\oplus\tilde{B}}(\mathbf{z}) = \sup\_{\{(\mathbf{x},\mathbf{y}) \mid \mathbf{x} + \mathbf{y} = \mathbf{z}\}} \left[ \mu\_{\tilde{A}}(\mathbf{x}) \star\_{T} \mu\_{\tilde{B}}(\mathbf{y}) \right],\tag{1.38}$$

• subtraction

$$\mu\_{\tilde{A}\ominus\tilde{B}}(\mathbf{z}) = \sup\_{\{(\mathbf{x},\mathbf{y}) \mid \mathbf{x} - \mathbf{y} = \mathbf{z}\}} \left[ \mu\_{\tilde{A}}(\mathbf{x}) \star\_{T} \mu\_{\tilde{B}}(\mathbf{y}) \right],\tag{1.39}$$

• multiplication

$$\mu\_{\tilde{A}\otimes\tilde{B}}(\mathbf{z}) = \sup\_{\{(\mathbf{x},\mathbf{y})|\mathbf{x}\mathbf{y}=\mathbf{z}\}} \left[\mu\_{\tilde{A}}(\mathbf{x}) \,\star\_{T}\mu\_{\tilde{B}}(\mathbf{y})\right],\tag{1.40}$$

• division

$$\mu\_{\tilde{A}\odot\tilde{B}}(\mathbf{z}) = \sup\_{\{(\mathbf{x},\mathbf{y}) \mid \mathbf{x}/\mathbf{y} = \mathbf{z}\}} \left[ \mu\_{\tilde{A}}(\mathbf{x}) \star\_{T} \mu\_{\tilde{B}}(\mathbf{y}) \right]. \tag{1.41}$$

*Example 1.14* Let us calculate addition, subtraction, multiplication, and division of the following fuzzy numbers.

$$\begin{aligned} \bar{A} &= 0.5/-2 + 1.0/-1 + 0.5/0, \\ \tilde{B} &= 0.8/4 + 1.0/5 + 0.8/6. \end{aligned}$$

It can be noticed that the first number represents a value "about −1" and the second one "about 5," because membership degrees for −1 and 5 are equal to 1. Useful calculations are presented in Table 1.2.


**Table 1.2** Arithmetic operations on fuzzy numbers defined based on the extension principle

Using (1.38) and Zadeh *t*-norm (minimum), values of the membership function of the sum are calculated as follows:

sup [min (0.5, 0.8)] , sup [min (0.5, 1.0), min (1.0, 0.8)],

*x*+*y*=2 *x*+*y*=3

sup [min (0.5, 0.8), min (1.0, 1.0), min (0.5, 0.8)],

*x*+*y*=4 sup *x*+*y*=5 [min (1.0, 0.8), min (0.5, 1.0)] , sup *x*+*y*=6 [min (0.5, 0.8)].

Finally we get

μ*<sup>A</sup>* <sup>⊕</sup>*<sup>B</sup>* (*z*) <sup>=</sup> <sup>0</sup>.5/<sup>2</sup> <sup>+</sup> <sup>0</sup>.8/<sup>3</sup> <sup>+</sup> <sup>1</sup>.0/<sup>4</sup> <sup>+</sup> <sup>0</sup>.8/<sup>5</sup> <sup>+</sup> <sup>0</sup>.5/6.

Values of the membership function of the subtraction, multiplication, and division are calculated similarly applying (1.39)–(1.41); final results are given below:

<sup>μ</sup>*<sup>B</sup><sup>A</sup>* (*z*) <sup>=</sup> <sup>0</sup>.5/<sup>4</sup> <sup>+</sup> <sup>0</sup>.8/<sup>5</sup> <sup>+</sup> <sup>1</sup>.0/<sup>6</sup> <sup>+</sup> <sup>0</sup>.8/<sup>7</sup> <sup>+</sup> <sup>0</sup>.5/8, μ*<sup>A</sup>* <sup>⊗</sup>*<sup>B</sup>* (*z*) <sup>=</sup> <sup>0</sup>.5/ <sup>−</sup> <sup>12</sup> <sup>+</sup> <sup>0</sup>.5/ <sup>−</sup> <sup>10</sup> <sup>+</sup> <sup>0</sup>.5/ <sup>−</sup> <sup>8</sup> <sup>+</sup> <sup>0</sup>.8/ <sup>−</sup> <sup>6</sup> <sup>+</sup> 1.0/ − 5 + 0.8/ − 4+ +0.5/0, <sup>μ</sup>*<sup>B</sup><sup>A</sup>*

 (*z*) <sup>=</sup> <sup>0</sup>.8/ <sup>−</sup> <sup>6</sup> <sup>+</sup> <sup>1</sup>.0/ <sup>−</sup> <sup>5</sup> <sup>+</sup> <sup>0</sup>.8/ <sup>−</sup> <sup>4</sup> <sup>+</sup> <sup>0</sup>.5/ <sup>−</sup> <sup>3</sup> <sup>+</sup> <sup>0</sup>.5/ <sup>−</sup> <sup>2</sup>.<sup>5</sup> <sup>+</sup> <sup>0</sup>.5/ <sup>−</sup> 2. It can be noted that the obtained results represent values: "about 4" (for the sum), "about 6" (subtraction), "about −5" (multiplication and division), which is consistent with classic arithmetic, for example, "about −1" + "about 5" = "about 4."

The considered arithmetic operations were defined based on the extension principle. Alternatively α-cuts of fuzzy numbers can be used. Figure 1.7a shows an α-cut of a fuzzy set *A* (see (1.20) in Sect. 1.2). According to the figure, as a result of an α-cut a classic set described by the interval *a*−, *a*<sup>+</sup> is obtained. Arithmetic operations on fuzzy numbers *A* and *<sup>B</sup>* using <sup>α</sup>-cuts consist in application of interval arithmetic to intervals describing α-cuts of these numbers: *A* <sup>α</sup> <sup>=</sup> *<sup>a</sup>*−,*<sup>a</sup>*<sup>+</sup> and *<sup>B</sup>*<sup>α</sup> <sup>=</sup> *<sup>b</sup>*−,*<sup>b</sup>*<sup>+</sup> . According to [1] arithmetic operations are defined as follows:

$$\begin{aligned} \left(\tilde{A}\oplus\tilde{B}\right)\_a = \begin{bmatrix} \tilde{a}\_- + \tilde{b}\_-, \tilde{a}\_+ + \tilde{b}\_+ \end{bmatrix}, \end{aligned} \tag{1.42}$$

$$\begin{aligned} \left(\tilde{A}\ominus\tilde{B}\right)\_a = \begin{bmatrix} \tilde{a}\_- - \tilde{b}\_+, \tilde{a}\_+ - \tilde{b}\_- \end{bmatrix}, \\ \left(\tilde{a}\_- \tilde{a}\_+, \tilde{a}\_- \tilde{a}\_- - \tilde{b}\_- \tilde{a}\_- \right), \end{aligned} \tag{1.43}$$

$$\left( \widetilde{A} \otimes \widetilde{B} \right)\_{\alpha} = \left[ \min \left( \widetilde{a}\_{-} \widetilde{b}\_{-}, \widetilde{a}\_{-} \widetilde{b}\_{+}, \widetilde{a}\_{+} \widetilde{b}\_{-}, \widetilde{a}\_{+} \widetilde{b}\_{+} \right), \right]$$

**Fig. 1.7** Arithmetic operations on fuzzy numbers using α-cuts

$$\max\_{\sim\_{\epsilon}} \left( \tilde{a}\_{-} \tilde{b}\_{-}, \tilde{a}\_{-} \tilde{b}\_{+}, \tilde{a}\_{+} \tilde{b}\_{-}, \tilde{a}\_{+} \tilde{b}\_{+} \right) \Big|\_{\sim\_{\epsilon}} \tag{1.44}$$

$$\begin{aligned} \left( A \oslash B \right)\_{\boldsymbol{a}} &= \left[ \min \left( \widetilde{a}\_{-}/b\_{-}, \widetilde{a}\_{-}/b\_{+}, \widetilde{a}\_{+}/b\_{-}, \widetilde{a}\_{+}/b\_{+} \right), \\ & \quad \max \left( \widetilde{a}\_{-}/\widetilde{b}\_{-}, \widetilde{a}\_{-}/\widetilde{b}\_{+}, \widetilde{a}\_{+}/\widetilde{b}\_{-}, \widetilde{a}\_{+}/\widetilde{b}\_{+} \right) \right], \quad \text{if } 0 \notin \left[ \widetilde{b}\_{-}, \widetilde{b}\_{+} \right]. \end{aligned} \tag{1.45}$$

*Example 1.15* Suppose we have two fuzzy numbers described by triangular membership functions:

$$\begin{aligned} \mu\_{\tilde{A}}(\mathbf{x}) &= \mu\_{\tilde{A}}\left(\mathbf{x}; \mathbf{2}, \mathbf{3}, 4\right), \\ \mu\_{\tilde{B}}(\mathbf{x}) &= \mu\_{\tilde{B}}\left(\mathbf{x}; \mathbf{4}, \mathbf{5}, \mathbf{7}\right), \end{aligned}$$

which are presented in Fig. 1.7b. Let us calculate addition, subtraction, multiplication, and division of *A* and *<sup>B</sup>* using their <sup>α</sup>-cuts.

Based on equations of straight lines including sides of triangles we get intervals describing α-cuts of *A* and *<sup>B</sup>* (for any <sup>α</sup> in the range [0, 1]):

*A* <sup>α</sup> <sup>=</sup> [<sup>α</sup> <sup>+</sup> <sup>2</sup>, <sup>−</sup><sup>α</sup> <sup>+</sup> 4], *<sup>B</sup>*<sup>α</sup> <sup>=</sup> [<sup>α</sup> <sup>+</sup> <sup>4</sup>, <sup>−</sup>2<sup>α</sup> <sup>+</sup> 7].

Applying (1.42) we get the interval

 *A* <sup>⊕</sup> *<sup>B</sup>* <sup>α</sup> = [2α + 6, −3α + 11],

where limits are functions describing locations of the beginning and the end of the interval describing an α-cut of the sum. Because functions are linear, replacing α with 0 and 1 provides parameters of the triangular membership function of the sum

μ*<sup>A</sup>* <sup>⊕</sup>*<sup>B</sup>* (*x*) <sup>=</sup> <sup>μ</sup>*<sup>A</sup>* <sup>⊕</sup>*<sup>B</sup>* (*x*; <sup>6</sup>, <sup>8</sup>, <sup>11</sup>), which is shown in Fig. 1.7c.

In a similar way, using (1.43) the results of the subtraction are obtained: the interval

 *A <sup>B</sup>* <sup>α</sup> = [3α − 5, −2α] and the membership function

μ*<sup>A</sup> <sup>B</sup>* (*x*) <sup>=</sup> <sup>μ</sup>*<sup>A</sup> <sup>B</sup>* (*x*; −5, <sup>−</sup>2, <sup>0</sup>), which is presented in Fig. 1.7d.

Determining the product requires more comments. Applying (1.44), the minimum and the maximum are searched among functions: α<sup>2</sup> + 6α + 8, −2α<sup>2</sup> + 3α + 14, −α<sup>2</sup> + 16 and 2α<sup>2</sup> − 15α + 28. From the analysis of values of these functions for α in the range [0, 1] the following interval is obtained

 *A* <sup>⊗</sup> *<sup>B</sup>* <sup>α</sup> = α<sup>2</sup> + 6α + 8, 2α<sup>2</sup> − 15α + 28 . Limits of the above interval are not linear functions, thus replacing α with 0 and

1 provides only values of *x*, for which the membership function takes values 0 and 1; that is, μ*<sup>A</sup>* <sup>⊗</sup>*<sup>B</sup>* (8) <sup>=</sup> 0, <sup>μ</sup>*<sup>A</sup>* <sup>⊗</sup>*<sup>B</sup>* (15) <sup>=</sup> 1 and <sup>μ</sup>*<sup>A</sup>* <sup>⊗</sup>*<sup>B</sup>* (28) <sup>=</sup> 0. To determine the membership function of the multiplication μ*<sup>A</sup>* <sup>⊗</sup>*<sup>B</sup>* (*x*), the following equations should be solved (with respect to α):

α<sup>2</sup> + 6α + 8 = *x*, 2α<sup>2</sup> − 15α + 28 = *x*.

The solutions are as follows: α<sup>1</sup>,<sup>2</sup> = <sup>−</sup><sup>3</sup> <sup>±</sup> <sup>√</sup><sup>1</sup> <sup>+</sup> *<sup>x</sup>* for the first equation, and α<sup>1</sup>,<sup>2</sup> = <sup>15</sup> <sup>±</sup> <sup>√</sup><sup>1</sup> <sup>+</sup> <sup>8</sup>*<sup>x</sup>* /4 for the second. In the case of the first equation, the function <sup>−</sup><sup>3</sup> <sup>+</sup> <sup>√</sup><sup>1</sup> <sup>+</sup> *<sup>x</sup>* is chosen as the membership function because it provides values in the range [0, 1] for *x* ∈ [8, 15]. Considering the second equation, for *x* ∈ [15, 28] the values in the range [0, 1] are provided by the function <sup>15</sup> <sup>−</sup> <sup>√</sup><sup>1</sup> <sup>+</sup> <sup>8</sup>*<sup>x</sup>* /4. Finally, the product is described by the following membership function

$$\mu\_{\tilde{A}\otimes\tilde{B}}(\mathbf{x}) = \begin{cases} -3 + \sqrt{1+\mathbf{x}}, & 8 \le \mathbf{x} \le 15, \\ \left(15 - \sqrt{1+8\mathbf{x}}\right)/4, & 15 < \mathbf{x} \le 28, \\ 0, & \mathbf{x} < 8 \quad \text{or} \quad \mathbf{x} > 28, \end{cases}$$

which is shown in Fig. 1.7e.

The result of the division is calculated similarly applying (1.45), however, there is no need to select solutions of equations since each of them has a single solution. Finally, we get the membership function

$$\mu\_{\tilde{A}\odot\tilde{B}}(\mathbf{x}) = \begin{cases} \frac{7\mathbf{x} - 2}{2\mathbf{x} + 1}, & \frac{2}{7} \le \mathbf{x} \le \mathbf{0}.6, \\\\ \frac{4(1 - \mathbf{x})}{\mathbf{x} + 1}, & \mathbf{0}.6 < \mathbf{x} \le 1, \\\\ \mathbf{0}, & \mathbf{x} < \frac{2}{7} \quad \text{or} \quad \mathbf{x} > 1, \end{cases}$$

which is presented in Fig. 1.7f.

Analyzing membership functions of the considered fuzzy numbers *A* and *<sup>B</sup>* it can be noted that they represent values "about 3" and "about 5," because membership degrees for 3 and 5 are equal to 1. The obtained results of arithmetic operations are correct; for example, the subtraction provided value "about −2."

As opposed to classic arithmetic, where two numbers are equal or are not equal, in fuzzy arithmetic a "partial equality" is possible. One of the methods of determining the degree of equality is based on the distance between compared fuzzy sets [16]. According to it, the equality index of sets *A* and *B* is defined as Eq1 (*A*, *B*) = 1 − *dp* (*A*, *B*), where *dp* (*A*, *B*) denotes Minkowski distance between sets described by membership functions μ*<sup>A</sup>* (*x*) and μ*<sup>B</sup>* (*x*)

$$d\_p\left(A,B\right) = \left(\int\_{\mathbb{X}} |\mu\_A\left(\mathbf{x}\right) - \mu\_B\left(\mathbf{x}\right)|^p \,d\mathbf{x}\right)^{\frac{1}{p}}, \qquad p > 1. \tag{1.46}$$

Minkowski distance between sets is also the basis of one of the methods of ranking fuzzy numbers [16]. According to it, to compare fuzzy numbers *A* and *<sup>B</sup>*, the fuzzy number *C* such as *<sup>A</sup>* <sup>≤</sup> *<sup>C</sup>* and *<sup>B</sup>* <sup>≤</sup> *<sup>C</sup>* is established. The comparison of *<sup>A</sup>* and *<sup>B</sup>* consists in the analysis of their Minkowski distances from *C* ; it is stated that *<sup>A</sup>* <sup>≤</sup> *<sup>B</sup>* if *dp A* ,*<sup>C</sup>* ≥ *dp <sup>B</sup>*,*<sup>C</sup>* . Most often *C* <sup>=</sup> max *A* , *<sup>B</sup>* is established based on the extension principle [16]

$$\mu\_{\max\{\tilde{A},\tilde{B}\}}(\mathbf{z}) = \sup\_{\{(\mathbf{x},\mathbf{y}) \mid \max(\mathbf{x},\mathbf{y}) = \mathbf{z}\}} \left[\mu\_{\tilde{A}}(\mathbf{x}) \star\_{T} \mu\_{\tilde{B}}(\mathbf{y})\right]. \tag{1.47}$$

Another way of ranking fuzzy numbers is to use their α-cuts [23].

The extension of the concept of fuzzy numbers are Ordered Fuzzy Numbers (OFNs) proposed in [14, 15]. The OFNs are ordered pairs of continuous real functions defined on the interval [0, 1] and their applications are the subject of research [4, 12, 17].

#### **1.7 Summary**

The chapter provides the review of basic issues concerning fuzzy sets, which – in contrast to classic sets – allow for partial membership of objects. As a result fuzzy sets are a good tool for representing vague and imprecise expressions of natural language. Various ways of describing fuzzy sets and concepts related to them were shown. We discussed the extension principle, which allows for extension of traditional mathematical functions to fuzzy sets, as well as the idea of fuzzy relation, which makes possible a formal description of the relationship between two or more fuzzy sets. Operations of cylindrical extension and projection of a fuzzy set, which enable increasing and reducing its dimensionality, were also described. A separate section was dedicated to fuzzy numbers and basic arithmetic operations on them.

**Acknowledgements** This work was supported by the Ministry of Science and Higher Education funding for statutory activities (BK-220/RAu-3/2016).

#### **References**


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Chapter 2 Introduction to Fuzzy Systems**

**Robert Czabanski, Michal Jezewski and Jacek Leski**

**Abstract** The following chapter describes the basic concepts of fuzzy systems and approximate reasoning. The study focuses mainly on fuzzy models based on Zadeh's compositional rule of inference. The presentation begins with an introduction of fundamental ideas of fuzzy conditional (if-then) rules. A collection of fuzzy if-then rules formulates the so-called knowledge base, which formally represents the knowledge to be processed during approximate reasoning. The subsequent sections present formal definitions related to the compositional rule of inference and approximate reasoning using a knowledge base. Theoretical considerations are supplemented with practical examples of fuzzy systems as the foundation of many modern structures. The description includes fuzzy systems proposed by Mamdani and Assilan, Takagi, Sugeno and Kang, and Tsukamoto.

#### **2.1 Introduction**

The main inspiration behind the introduction of fuzzy sets theory was the necessity for modeling real-world phenomena, which are inherently vague and ambiguous. Human knowledge about complex problems can be successfully represented using the imprecise terms of natural language. The theories of fuzzy sets and fuzzy logic provide formal tools for mathematical representation and efficient processing of such information.

The term "system" is usually understood as a set of interacting components with well-defined structure and organized as an intricate whole that can be distinguished from the "external" environment. A system communicates with the environment

R. Czabanski (B) · M. Jezewski · J. Leski

Institute of Electronics, Silesian University of Technology, Akademicka Str. 16, 44-100 Gliwice, Poland e-mail: robert.czabanski@polsl.pl

M. Jezewski e-mail: michal.jezewski@polsl.pl

J. Leski e-mail: jacek.leski@polsl.pl

**Fig. 2.1** The typical structure of a fuzzy system

through so-called inputs and outputs. Fuzzy systems are structures based on fuzzy techniques oriented towards information processing, where the usage of classical sets theory and binary logic is impossible or difficult. In the literature, terms such as fuzzy system, fuzzy model, system based on fuzzy rules, fuzzy controller, or fuzzy associative memory are used interchangeably depending on the application type [16]. Their main characteristic involves symbolic knowledge representation in a form of fuzzy conditional (if-then) rules.

The typical structure of a fuzzy system (Fig. 2.1) consists of four functional blocks: the fuzzifier, the fuzzy inference engine, the knowledge base, and the defuzzifier. Both linguistic values (defined by fuzzy sets) and crisp (numerical) data can be used as inputs for a fuzzy system. If crisp data are applied, then the inference process is preceded by fuzzification, which assigns the appropriate fuzzy set to the nonfuzzy input. The values of input variables are mapped into linguistic values of the output variable by means of the appropriate method of approximate reasoning (inference engine) using expert knowledge, which is represented as a collection of fuzzy conditional rules (knowledge base). In addition to the linguistic values, the numerical data may be required as the fuzzy system output. In such cases defuzzification methods are used, which assign the representative crisp data to the resultant output fuzzy set.

Practical applications of fuzzy systems include problems for which the complete mathematical description is unavailable, or where the usage of the precise (nonfuzzy) model is uneconomical or highly inconvenient. The ability to process inaccurate information makes a fuzzy system an excellent tool, for example, for control processes [12, 19], system identification [11, 20], decision support [24, 33], and signal and image processing [4, 23].

In the following sections only static fuzzy systems (i.e., systems where the outputs are determined only on the basis of the current input values) are considered. Included are concepts of knowledge representation in the form of fuzzy conditional rules, the idea of approximate reasoning, and the description of basic structures of fuzzy systems.

#### **2.2 Fuzzy Conditional Rules**

One of the fundamental concepts of fuzzy sets theory is a linguistic variable [34]. Its values are the statements of natural language (terms), which are the labels (descriptions) of fuzzy sets defined on a given universe (space) of discourse. Formally, a linguistic variable is defined as a quintuple [35]:

$$X = \left(\mathcal{N}, \mathcal{QC}\left(\mathbf{G}\right), \mathbb{X}, \mathbf{G}, \mathbf{S}\right), \tag{2.1}$$

where *N* is a name of the linguistic variable, *L* (G) denotes the family of values of the linguistic variable being a collection of labels of the fuzzy sets defined on the universe X, G is the set of syntactic rules defined by a grammar determining all terms in *L* (G), and S represents the semantics of the variable *X*, that defines the meaning of all labels.

As an example we can use a linguistic variable describing the fetal heart rate (FHR). The name of the variable can be defined as *N* = "mean FHR". According to FIGO guidelines [21], the set of possible linguistic values is a collection of three labels describing the fetal state as: *L* = {"normal," "suspicious," "pathological"}. To each of the labels we can assign a fuzzy set *Ai* : *i* = 1, 2,..., 5, defined on <sup>X</sup> = [0, <sup>250</sup>] bpm, which represents the range of possible number of heart beats per min [3]. The examples of membership functions μ*Ai*(*x*) of the fuzzy sets *Ai* are shown in Fig. 2.2.

An elementary statement for the linguistic variable *X* is the fuzzy expression:

$$X \text{ is } L\_A,\tag{2.2}$$

where *L <sup>A</sup>* is a label from the collection *L* (G), defined by a fuzzy set *A* on the universe X. The logical value of the expression is determined on the basis of membership function μ*<sup>A</sup>* (*x*) of the fuzzy set *A*. In the preceding example, an elementary statement is:

**Fig. 2.2** Examples of membership functions of fuzzy sets defining the values of the linguistic variable *X* = "mean FHR"

#### "mean FHR" **is** "normal",

which value for the measurement 110 bpm is equal to μ*<sup>A</sup>*<sup>3</sup> (*x*) = 0.5 (see Fig. 2.2).

A more complex fuzzy expression can be obtained by combining two or more elementary expressions. It can be presented in the conjunctive:

$$(X\_1 \text{ is } L\_{A\_1}) \text{ and } (X\_2 \text{ is } L\_{A\_2}), \tag{2.3}$$

or the disjunctive form:

$$(X\_1 \text{ is } L\_{A\_1}) \text{ or } (X\_2 \text{ is } L\_{A\_2}), \tag{2.4}$$

where *X*1, *X*<sup>2</sup> are linguistic variables with labels *L <sup>A</sup>*<sup>1</sup> , *L <sup>A</sup>*<sup>2</sup> defined by the fuzzy sets *A*<sup>1</sup> and *A*2, respectively, on the universes X<sup>1</sup> and X2.

The value of a complex fuzzy expression for *<sup>x</sup>*<sup>1</sup> <sup>∈</sup> <sup>X</sup><sup>1</sup> and *<sup>x</sup>*<sup>2</sup> <sup>∈</sup> <sup>X</sup><sup>2</sup> is determined on the basis of the membership functions of fuzzy sets *A*<sup>1</sup> and *A*<sup>2</sup> [16]:

$$
\mu\_{A\_1}(\mathbf{x}\_1) \star\_T \mu\_{A\_2}(\mathbf{x}\_2) \,, \tag{2.5}
$$

for the conjunctive form, and

$$
\left(\mu\_{A\_1}(\mathbf{x}\_1)\,\star\_S\,\mu\_{A\_2}(\mathbf{x}\_2)\right),\tag{2.6}
$$

for the disjunctive form, where -*<sup>T</sup>* denotes a *t*-norm, and -*<sup>S</sup>* an *s*-norm.

An elementary fuzzy statement can also be expressed in the form of an implication forming a fuzzy if-then rule (fuzzy conditional statement):

$$\text{if } \begin{pmatrix} X \ \text{is } L\_A \end{pmatrix}, \text{ then } \begin{pmatrix} Y \ \text{is } L\_B \end{pmatrix}, \tag{2.7}$$

defining a relationship between linguistic variables. The statement "*X* **is** *L <sup>A</sup>*" is called the antecedent (premise), and the statement "*Y* **is** *L <sup>B</sup>*" is called the consequent (conclusion).

A generalized form of the fuzzy conditional statement can be defined as an implication of complex fuzzy expressions. For the conjunctive form it can be written as:

$$\begin{array}{lcl}\textbf{if}\ \left(X\_{1}\ \textbf{is}\ L\_{A\_{1}}\right)\ \textbf{and}\ \left(X\_{2}\ \textbf{is}\ L\_{A\_{2}}\right)\ \textbf{and}\ \cdots \ \textbf{and}\ \left(X\_{N}\ \textbf{is}\ L\_{A\_{N}}\right),\\\textbf{then}\ \left(Y\_{1}\ \textbf{is}\ L\_{B\_{1}}\right),\ \left(Y\_{2}\ \textbf{is}\ L\_{B\_{2}}\right),\ldots,\left(Y\_{M}\ \textbf{is}\ L\_{B\_{M}}\right),\end{array}$$

and for the disjunctive form as:

$$\begin{array}{l}\text{if } \begin{pmatrix} X\_1 \ \text{is } L\_{A\_1} \end{pmatrix} \text{ or } \begin{pmatrix} X\_2 \ \text{is } L\_{A\_2} \end{pmatrix} \text{ or } \begin{pmatrix} \end{pmatrix} \text{ or } \begin{pmatrix} X\_N \ \text{is } L\_{A\_N} \end{pmatrix}, \\\text{then } \begin{pmatrix} Y\_1 \ \text{is } L\_{B\_1} \end{pmatrix}, \begin{pmatrix} Y\_2 \ \text{is } L\_{B\_2} \end{pmatrix}, \dots, \begin{pmatrix} Y\_M \ \text{is } L\_{B\_M} \end{pmatrix}, \end{array} \tag{2.9}$$

where *X*1, *X*2,..., *X <sup>N</sup>* are the input linguistic variables; *Y*1, *Y*2,..., *YM* are the output linguistic variables; *L <sup>A</sup>*<sup>1</sup> , *L <sup>A</sup>*<sup>2</sup> ,..., *L AN* , and *L <sup>B</sup>*<sup>1</sup> , *L <sup>B</sup>*<sup>2</sup> ,..., *L BM* are their linguistic values, defined with fuzzy sets *A*1, *A*2,..., *AN* and *B*1, *B*2,..., *BM* on universes X1, X2,..., X*<sup>N</sup>* , and Y1, Y2,..., Y*<sup>M</sup>* , respectively.

Both implications are the fuzzy if-then rules with multiple inputs and multiple outputs (MIMO). The MIMO fuzzy rule can be decomposed into the corresponding set of canonical fuzzy if-then rules [16], which are the MISO (multiple inputs and single output) type of fuzzy conditional statements with conjunctive antecedent:

$$\text{if } \mathop{\text{and}}\limits\_{n=1}^{N} \left( X\_n \text{ is } L\_{A\_n} \right), \text{ then } Y \text{ is } L\_B. \tag{2.10}$$

Canonical fuzzy conditional statements are the basics for representing expert knowledge in a fuzzy system. Using pseudo-vector notation, the canonical fuzzy if-then rule can be written as

$$\text{iff } (\mathbf{X} \text{ is } \mathbf{L}\_{\mathbf{A}})\text{, then } (Y \text{ is } L\_{B})\text{,}\tag{2.11}$$

which is an *N* + 1-nary fuzzy relation [4]:

$$R = ((A\_1 \times A\_2 \times \cdots \times A\_N) \implies B) \, = \, (\mathbf{A} \Longrightarrow B) \,, \tag{2.12}$$

defined on <sup>X</sup><sup>1</sup> <sup>×</sup> <sup>X</sup><sup>2</sup> ×···× <sup>X</sup>*<sup>N</sup>* <sup>×</sup> <sup>Y</sup>, with the membership function:

$$
\mu\_{\mathcal{R}}\left(\mathbf{x}\_{1},\ldots,\mathbf{x}\_{N},\mathbf{y}\right) = \Phi\left(\mu\_{\mathcal{A}}\left(\mathbf{x}\right),\mu\_{\mathcal{B}}\left(\mathbf{y}\right)\right),\tag{2.13}
$$

where **x** = [*x*1,..., *xN* ] *<sup>T</sup>* <sup>∈</sup> <sup>X</sup><sup>1</sup> <sup>×</sup> <sup>X</sup><sup>2</sup> ×···× <sup>X</sup>*<sup>N</sup>* , *<sup>y</sup>* <sup>∈</sup> <sup>Y</sup>, and depending on the interpretation of the fuzzy if-then rule, Φ (·, ·) denotes a *t*-norm (a conjunctive interpretation) [8, 16] or fuzzy implication (logical interpretation) [8, 9, 16].

If the conjunction "and" in the antecedents of the fuzzy if-then rules is represented by a *t*-norm *T* , then:

$$
\mu\_{\mathbf{A}}\left(\mathbf{x}\right) = \mu\_{A\_{\parallel}}\left(\mathbf{x}\_{1}\right) \star\_{T} \mu\_{A\_{2}}\left(\mathbf{x}\_{2}\right) \star\_{T} \cdots \star\_{T} \mu\_{A\_{N}}\left(\mathbf{x}\_{N}\right),\tag{2.14}
$$

where *A*1, *A*2,..., *AN* are fuzzy sets representing the values of linguistic variables in the antecedent of the canonical fuzzy rule.

Hence, for the conjunctive interpretation we get:

$$
\mu\_{\mathcal{R}}\left(\mathbf{x},\mathbf{y}\right) = \mu\_{\mathcal{R}}\left(\mathbf{x}\_{1},\ldots,\mathbf{x}\_{N},\mathbf{y}\right) = \mu\_{\mathcal{A}}\left(\mathbf{x}\right) \star\_{\mathcal{T}\_{\mathcal{T}}} \mu\_{\mathcal{B}}\left(\mathbf{y}\right) = \\
\mu\_{A\_{1}}\left(\mathbf{x}\_{1}\right) \star\_{\mathcal{T}} \mu\_{A\_{2}}\left(\mathbf{x}\_{2}\right) \star\_{\mathcal{T}} \dots \star\_{\mathcal{T}\_{\mathcal{T}}} \mu\_{A\_{N}}\left(\mathbf{x}\_{N}\right) \star\_{\mathcal{T}\_{\mathcal{T}}} \mu\_{\mathcal{B}}\left(\mathbf{y}\right),\tag{2.15}
$$

where -*Tr* is a *t*-norm representing the fuzzy if-then rule, whereas for logical interpretation:

$$
\mu\_R\left(\mathbf{x}, \mathbf{y}\right) = \mu\_R\left(\mathbf{x}\_1, \dots, \mathbf{x}\_N, \mathbf{y}\right) = \Psi\left(\mu\_\Lambda\left(\mathbf{x}\right), \mu\_B\left(\mathbf{y}\right)\right) = 
$$

$$
\Psi\left(\mu\_{A\_1}\left(\mathbf{x}\_1\right) \star \tau \left| \mu\_{A\_2}\left(\mathbf{x}\_2\right) \star \tau \dots \star \tau \left| \mu\_{A\_N}\left(\mathbf{x}\_N\right), \mu\_B\left(\mathbf{y}\right)\right)\right.\tag{2.16}
$$

where Ψ (·, ·) denotes a fuzzy implication.

Fuzzy implication is usually introduced using an axiomatic approach [9], where it is defined as a continuous function Ψ : [0, 1]×[0, 1]→[0, 1], which for each *a*, *b*, *c* ∈ [0, 1] fulfills five necessary (general) conditions:

P1: if *a* ≤ *c*, then Ψ (*a*, *b*) ≥ Ψ (*c*, *b*), P2: if *b* ≤ *c*, then Ψ (*a*, *b*) ≤ Ψ (*a*, *c*), P3: Ψ (0, *b*) = 1, P4: Ψ (*a*, 1) = 1, P5: Ψ (1, 0) = 0,

and eight recommended (specific) conditions [4]. Properties P3, P4, and P5 are called falsity, neutrality, and Booleanity, respectively [4, 22]. As examples we can use Lukasiewicz:

$$\Psi\left(a,b\right) = \min\left(1 - a + b, 1\right),\tag{2.17}$$

Reichenbach:

$$
\Psi'(a,b) = 1 - a + ab,\tag{2.18}
$$

and Zadeh fuzzy implication:

$$\Psi\left(a,b\right) = \max\left(1-a, \min\left(a,b\right)\right). \tag{2.19}$$

A single fuzzy rule describes a local relationship between the input and output variables of the fuzzy system within the limits defined by the domain of fuzzy sets in the rule antecedent. The complete input–output mapping is represented by the whole collection of fuzzy if-then rules from the knowledge (rule) base. For further considerations we assume a base consisting of *I* rules in the form:

$$\mathcal{A} = \left\{ R^{(i)} \right\}\_{i=1}^{I} = \left\{ \text{if } \text{and} \left( X\_n \text{ is } L\_{A\_n}^{(i)} \right), \text{ then } Y \text{ is } L\_B^{(i)} \right\}\_{i=1}^{I} \text{.} \tag{2.20}$$

A well-defined fuzzy rule base should be complete, consistent, and continuous [31]. The completeness means that for each value from the input space at least one rule is activated, that is ∃*<sup>i</sup>*=1,2,...,*<sup>I</sup>* μ**A**(*i*) (**x**) = 0. The knowledge base is consistent if there are no rules with the same antecedent but different consequents. And finally, the knowledge base is continuous if there are no neighboring rules, for which the result of intersection of fuzzy sets in their consequents is an empty set.

The knowledge base is constructed first by acquiring knowledge about the modeled phenomenon, and next by representing it in a form of fuzzy conditional rules. In practice, there are three basic methods to create a fuzzy rule base [16]:

#### 2 Introduction to Fuzzy Systems 29


The possible applications of a fuzzy system depend, however, not only on the properly defined knowledge base, but also on the appropriate design of an inference engine.

#### **2.3 Approximate Reasoning**

Inference methods originating from classical logic are based on so-called rules of inference. A rule of inference is a pattern of reasoning that explains how a conclusion may be logically derived from a given premise previously assumed to be true. One of the most commonly used rules of inference is the rule of detachment, often referred to as modus ponendo ponens ("the way that affirms by affirming"). Modus ponendo ponens (MPP) is based on two premises. The first is the conditional statement *p* =⇒ *q*, namely that "*p* implies *q*". The second assumes that the antecedent *p* of the conditional statement is true. From these two premises it can be concluded that the consequent *q* is true. The MPP rule can be written as [4]:

> Premise I (fact): *p* Premise II (rule): *p* =⇒ *q* Conclusion: *q*

or symbolically:

$$((p \land (p \implies q)) \implies q. \tag{2.21}$$

Binary logic assumes only two possibilities: total compliance or total noncompliance of the fact with the implication antecedent. In contrast, fuzzy inference engines use an approximate reasoning based on the generalized rules of inference. The generalized modus ponendo ponens (GMPP) may be written as [34]:

> Premise I (fact): *p* Premise II (rule): *p* =⇒ *q* Conclusion: *q*

$$\left[p' \land (p \implies q)\right] \implies q',\tag{2.22}$$

where statements *p* and *q* are similar, respectively, to *p* and *q*.

A conditional fuzzy rule can be defined as a fuzzy relation, and hence, the statements in antecedents and consequents as fuzzy sets. The statement *X* **is** *L <sup>A</sup>* is a fact, where *L <sup>A</sup>* denotes the label of a linguistic variable *X* defined by a fuzzy set *A* on the universe X. The knowledge is represented by the fuzzy conditional rule "**if** *X* **is** *L <sup>A</sup>*, **then** *Y* **is** *L <sup>B</sup>*," where *L <sup>A</sup>* and *L <sup>B</sup>* are the linguistic values of linguistic variables *X* and *Y* , defined by fuzzy sets *A* and *B*, on the universes X and Y, respectively. Consequently, the inference scheme of GMPP takes the form:

> Premise I (fact): *X* **is** *L <sup>A</sup>* Premise II (rule): **if** *X* **is** *L <sup>A</sup>*, **then** *Y* **is** *L <sup>B</sup>* Conclusion: *Y* **is** *L <sup>B</sup>*

or:

$$[(X \text{ is } L\_{A'}) \land (X \text{ is } L\_A \implies Y \text{ is } L\_B)] \implies Y \text{ is } L\_{B'}.\tag{2.23}$$

The fuzzy set *B* is determined using Zadeh's compositional rule of inference [34].

#### *2.3.1 Compositional Rule of Inference*

The compositional rule of inference (CRI), also known as supremum-star composition [34], is a generalization of an operation for determining the function value. The first stage of CRI is to construct a cylindrical extension of a fuzzy set *A* (*x*) from the universe <sup>X</sup> to <sup>X</sup> <sup>×</sup> <sup>Y</sup>:

$$\mathop{\Psi}\_{\mathbf{((x,y))\in\mathbb{X}\times\mathbb{Y}}}\mu\_{\text{Ce}(A')}\left(\mathbf{x},\mathbf{y}\right) = \mu\_{A'}\left(\mathbf{x}\right).\tag{2.24}$$

Secondly, an intersection (logical product) of cylindrical extension Ce - *A* and fuzzy relation *R* is constructed using *t*-norm *T* :

$$\begin{array}{ll}\mathsf{Y} & \mu\_{\mathsf{Ce}(A')\cap\mathsf{R}}\left(\mathbf{x},\mathbf{y}\right) = \mu\_{\mathsf{Ce}(A')}\left(\mathbf{x},\mathbf{y}\right)\star\_{\mathsf{T}}\mu\_{\mathsf{R}}\left(\mathbf{x},\mathbf{y}\right) \\\ \mu\left(\mathbf{x},\mathbf{y}\right)\star\_{\mathsf{T}}\mu\_{\mathsf{R}}\left(\mathbf{x},\mathbf{y}\right). \end{array} \tag{2.25}$$

The final CRI outcome is a result of the Ce - *A* <sup>∩</sup> *<sup>R</sup>* projection on <sup>Y</sup>:

$$\mathop{\mathsf{V}}\_{\mathbf{y}\in\mathsf{Y}}\mu\_{B'}\left(\mathbf{y}\right) = \sup\_{\mathbf{x}\in\mathsf{X}}\left[\mu\_{A'}\left(\mathbf{x}\right)\star\_{\mathsf{T}}\mu\_{R}\left(\mathbf{x},\mathbf{y}\right)\right].\tag{2.26}$$

or:

The fuzzy set *B* can also be presented as a composition of a fuzzy set *A* , which is an unary fuzzy relation, with conditional fuzzy rule *R* being a binary fuzzy relation:

$$B' = A' \circ R,\tag{2.27}$$

where ◦ is the operator of the supremum-*t*-norm composition.

The GMPP for the *i*th canonical fuzzy if-then rule (2.20) can be written as [16]:

$$\mathcal{B}^{\prime(i)} = \mathbf{A}^{\prime} \circ \mathcal{R}^{(i)} = \mathbf{A}^{\prime} \circ \left(\mathbf{A}^{(i)} \implies \mathcal{B}^{(i)}\right),\tag{2.28}$$

where **A** = *A* <sup>1</sup> × *A* <sup>2</sup> ×···× *A <sup>N</sup>* is a multidimensional fuzzy set that defines the value of the multidimensional input linguistic variable on the space <sup>X</sup> <sup>=</sup> <sup>X</sup><sup>1</sup> <sup>×</sup> <sup>X</sup><sup>2</sup> <sup>×</sup> ···× <sup>X</sup>*<sup>N</sup>* .

The membership function of the conclusion *B* (*i*) is calculated as follows.

$$\begin{aligned} \mu\_{\mathcal{B}^{(i)}}\left(\mathbf{y}\right) &= \sup\_{\mathbf{x} \in \underline{\mathbf{x}}} \Big[ \mu\_{\mathcal{A}^{\prime}}\left(\mathbf{x}\right) \star\_{T\_{\mathcal{I}}} \mu\_{R^{(i)}}\left(\mathbf{x}, \mathbf{y}\right) \Big] = \\ \sup\_{\mathbf{x} \in \underline{\mathbf{x}}} \Big[ \mu\_{A\_{\mathrm{i}}^{\prime}}\left(\mathbf{x}\_{1}\right) \star\_{T} \mu\_{A\_{\mathrm{i}}^{\prime}}\left(\mathbf{x}\_{2}\right) \star\_{T} \cdots \star\_{T} \mu\_{A\_{\mathrm{i}}^{\prime}}\left(\mathbf{x}\_{N}\right) \star\_{T\_{\mathcal{I}}} \mu\_{R^{(i)}}\left(\mathbf{x}\_{1}, \dots, \mathbf{x}\_{N}, \mathbf{y}\right) \Big], \end{aligned} \tag{2.29}$$

where *Ts* is a *t*-norm of the supremum-*t*-norm composition. In the case of the conjunctive interpretation (2.15) we can write:

$$
\mu\_{B^{(0)}}\left(\mathbf{y}\right) = \sup\_{\mathbf{x} \in \underline{\underline{\mathbf{X}}}} \left[ \mu\_{A^{\prime}}\left(\mathbf{x}\right) \star\_{T\_{\ast}} \mu\_{A^{(0)}}\left(\mathbf{x}\right) \star\_{T\_{\ast}} \mu\_{B^{(0)}}\left(\mathbf{y}\right) \right] = 
$$

$$
\sup\_{\mathbf{x} \in \underline{\underline{\mathbf{X}}}} \left[ \left( \mu\_{A\_{1}^{\prime}}\left(\mathbf{x}\_{1}\right) \star\_{T} \mu\_{A\_{2}^{\prime}}\left(\mathbf{x}\_{2}\right) \star\_{T} \cdots \star\_{T} \mu\_{A\_{N}^{\prime}}\left(\mathbf{x}\_{N}\right) \right) \star\_{T\_{\ast}} \right]
$$

$$
\left( \mu\_{A\_{1}^{(0)}}\left(\mathbf{x}\_{1}\right) \star\_{T} \mu\_{A\_{2}^{(0)}}\left(\mathbf{x}\_{2}\right) \star\_{T} \cdots \star\_{T} \mu\_{A\_{N}^{(0)}}\left(\mathbf{x}\_{N}\right) \right) \star\_{T\_{\ast}} \mu\_{B^{(0)}}\left(\mathbf{y}\right) \right]. \tag{2.30}
$$

And for logical interpretation (2.16) we get:

$$
\mu\_{B^{(i)}}\left(\mathbf{y}\right) = \sup\_{\mathbf{x} \in \underline{\mathbf{X}}} \left[ \mu\_{A'}\left(\mathbf{x}\right) \star\_{T\_{\mathbf{r}}} \Psi\left(\mu\_{A^{(i)}}\left(\mathbf{x}\right), \mu\_{B^{(i)}}\left(\mathbf{y}\right)\right) \right] = 
$$

$$
\sup\_{\mathbf{x} \in \underline{\mathbf{X}}} \left[ \left( \mu\_{A'\_{1}}\left(\mathbf{x}\_{1}\right) \star\_{T} \mu\_{A'\_{2}}\left(\mathbf{x}\_{2}\right) \star\_{T} \cdots \star\_{T} \mu\_{A'\_{N}}\left(\mathbf{x}\_{N}\right) \right) \star\_{T\_{\mathbf{r}}} \right. \\
$$

$$
\Psi\left(\mu\_{A^{(0)}\_{1}}\left(\mathbf{x}\_{1}\right) \star\_{T} \mu\_{A^{(0)}\_{1}}\left(\mathbf{x}\_{2}\right) \star\_{T} \cdots \star\_{T} \mu\_{A^{(0)}\_{N}}\left(\mathbf{x}\_{N}\right) \right) , \mu\_{B^{(0)}}\left(\mathbf{y}\right) \right] \,. \tag{2.31}
$$

Under certain conditions [5], logical and conjunctive interpretation of fuzzy conditional rules leads to equivalent inference results.

Equations (2.30) and (2.31) define the membership function of a fuzzy set representing the resulting conclusion of an inference using only one fuzzy if-then rule. For a knowledge base consisting of many fuzzy conditional statements it is necessary to combine conclusions from all individual rules.

#### *2.3.2 Approximate Reasoning with Knowledge Base*

Generally, there are two methods of approximate reasoning that can be applied to determine the outcome fuzzy set *B* on the basis of a collection of fuzzy if-then rules [4]:


The FATI process of combining the rules, as well as the stage in the FITA schema of determining the resulting conclusion, is called aggregation [10]. The aggregation can be defined by introduction of the concept of the aggregation operator [16], which for *I* values *x*1, *x*2,..., *xI* ∈ [0, 1] represents a mapping ⊕:[0, 1]*<sup>I</sup>* ⇒ [0, 1]:

$$\mathbf{x} = \bigoplus\_{i=1}^{l} \mathbf{x}\_i = \oplus \left(\mathbf{x}\_1, \mathbf{x}\_2, \dots, \mathbf{x}\_I\right). \tag{2.32}$$

There are various definitions of aggregation operator including logical sum, represented by an *s*-norm (Mamdani combination [19]), logical product, represented by a *t*-norm (Gödel combination [16]), as well as nonmonotonic fuzzy operations that allow conducting the inference even if part of the knowledge is missing [32]. Most of them can be defined as special cases of the generalized average operator [4]:

$$\left| \uplus\_{(a)} (\mathbf{x}\_{1}, \dots, \mathbf{x}\_{I}) = \biguplus\_{i=1}^{I} \mathbf{x}\_{i} = \left[ \frac{1}{I} \sum\_{i=1}^{I} (\mathbf{x}\_{i})^{\alpha} \right]^{\frac{1}{\alpha}},\tag{2.33}$$

for <sup>α</sup> <sup>∈</sup> <sup>R</sup> \ {0}.

Consequently, the first stage of the FATI method can be defined as:

$$\mathcal{R} = \bigoplus\_{i=1}^{I} \mathcal{R}^{(i)},\tag{2.34}$$

where *R*(*i*) is the *i*th fuzzy relation.

Next, the outcome fuzzy set *B FAT I* is determined for an input fuzzy set **A** using the GMPP:

$$B'\_{FATI} = \mathbf{A}' \diamond \mathcal{R} = \mathbf{A}' \diamond \left[ \bigoplus\_{i=1}^{I} \mathbf{R}^{(i)} \right],\tag{2.35}$$

the membership function of which is defined as

$$\begin{split} \mu\_{\mathcal{B}\_{\widetilde{\rm F}\rm{AT}}^{\prime}}(\mathbf{y}) &= \sup\_{\mathbf{x} \in \underline{\mathbf{X}}} \Big[ \mu\_{\mathcal{A}^{\prime}}(\mathbf{x}) \star\_{\mathbf{T}\_{\ast}} \mu\_{\mathcal{A}^{\prime}}(\mathbf{x}, \mathbf{y}) \Big] \\ &= \sup\_{\mathbf{x} \in \underline{\mathbf{X}}} \Big[ \mu\_{\mathcal{A}^{\prime}}(\mathbf{x}) \star\_{\mathbf{T}\_{\ast}} \Big[ \bigoplus\_{i=1}^{I} \mu\_{\mathcal{R}^{(i)}}(\mathbf{x}, \mathbf{y}) \Big] \Big]. \end{split} \tag{2.36}$$

In the case of the FITA method, first the conclusion of each fuzzy if-then rule is determined:

$$\mathop{\Psi}\_{i=1,2,\ldots,I} \quad \mathbf{B}^{\prime(i)} = \mathbf{A}^{\prime} \diamond \mathbf{R}^{(i)},\tag{2.37}$$

the membership function of which is written as:

$$\mu\_{B^{(i)}}\left(\mathbf{y}\right) = \sup\_{\mathbf{x}\in\underline{\mathbf{X}}} \left[\mu\_{\mathbf{A}^{i}}\left(\mathbf{x}\right)\star\_{\mathbf{T}\_{i}}\mu\_{R^{(i)}}\left(\mathbf{x},\mathbf{y}\right)\right].\tag{2.38}$$

During the next stage, these partial results of the inference are aggregated forming the outcome fuzzy set:

$$\mathcal{B}'\_{FITA} = \bigoplus\_{i=1}^{I} \left(\mathbf{A}' \diamond \mathcal{R}^{(i)}\right),\tag{2.39}$$

defined by the membership function:

$$\mu\_{B'\_{FITA}}(\mathbf{y}) = \bigoplus\_{i=1}^{I} \sup\_{\mathbf{x} \in \underline{\mathbf{x}}} \left[ \mu\_{\mathbf{A'}}(\mathbf{x}) \star\_{T\_x} \mu\_{R^{(i)}}(\mathbf{x}, \mathbf{y}) \right]. \tag{2.40}$$

It can be proven [7], that the results of the FATI method are a subset of those obtained using the FITA procedure:

$$B\_{FATI}' \subseteq B\_{FITA}',\tag{2.41}$$

that is:

$$\mathop{\mathsf{h}}\_{\mathbf{y}\in\mathbb{Y}}\,\,\,\mu\_{\mathsf{B}\_{FAT}^{'}}\left(\mathbf{y}\right)\leq\mu\_{\mathsf{B}\_{FITA}^{'}}\left(\mathbf{y}\right).\tag{2.42}$$

Usually, for simplicity of calculations, the *B FAT I* is used instead of *B FITA*, under the assumption that the difference is insignificant [4].

#### *2.3.3 Fuzzification and Defuzzification*

In many applications inputs of the fuzzy systems are defined as crisp numerical data. However, approximate reasoning requires inputs to be represented as fuzzy sets. The process of mapping real values **x**<sup>0</sup> = [*x*01, *x*02,..., *x*0*<sup>N</sup>* ] <sup>∈</sup> <sup>X</sup> <sup>⊂</sup> <sup>R</sup>*<sup>N</sup>* to an *N*-dimensional fuzzy set **A** defined on X is called fuzzification. The fuzzification can be symbolically expressed as a transformation of *N*-dimensional space into a multitude of fuzzy sets [16]:

$$
\underline{\mathbb{X}} \Rightarrow \mathcal{J} \; (\underline{\mathbb{X}}).\tag{2.43}
$$

Using membership functions we can write:

$$\underline{\mathbb{X}} \Rightarrow \left\{ \mu\_{\Lambda'} (\mathbf{x}) \mid \mathbf{x} \in \underline{\mathbb{X}}, \mu\_{\Lambda'} (\mathbf{x}) \in [0, 1] \right\}. \tag{2.44}$$

Among many definitions of a fuzzification operator, the singleton fuzzifier can be distinguished:

$$
\mu\_{\mathbf{A}'} (\mathbf{x}) = \; \delta\_{\mathbf{x}, \mathbf{x}\_0} = \begin{cases} 1, & \mathbf{x} = \mathbf{x}\_0, \\ 0, & \mathbf{x} \neq \mathbf{x}\_0, \end{cases} \tag{2.45}
$$

for which both methods of approximate reasoning (FATI and FITA) provide equivalent inference results [5].

The result of approximate reasoning is a fuzzy set *B* (*y*), which can be associated with a specific linguistic label. However, there are applications that require a crisp numerical inference outcome. The process of calculating a representative numerical output *<sup>y</sup>*<sup>0</sup> <sup>∈</sup> <sup>Y</sup> from the outcome fuzzy set *<sup>B</sup>* (*y*) on Y is called defuzzification. Defuzzification is a mapping of a multitude of fuzzy sets defined on the space Y to a single numerical value from Y [16]:

$$
\mathbb{J}\,\mathbb{P}\,(\mathbb{Y}) \to \mathbb{Y}.\tag{2.46}
$$

Using membership functions we get:

$$\{\mu\_{\mathcal{B}'}(\mathbf{y})|\text{ y }\in\mathbb{Y}, \mu\_{\mathcal{B}'}(\mathbf{y}) \in [0, 1] \} \to \mathbb{Y}.\tag{2.47}$$

Due to the different criteria for determining which element *y*<sup>0</sup> of the fuzzy set *B* (*y*) should be regarded as the most representative one, there are many definitions of the defuzzification procedure [6, 14, 31]. One of the most popular is a center of gravity method (COG), which specifies the result as a center of the area under the membership function μ*<sup>B</sup>* (*y*):

*y*<sup>0</sup> = Y *y* μ*<sup>B</sup>* (*y*) *dy* Y μ*<sup>B</sup>* (*y*) *dy* . (2.48)

#### **2.4 Basic Types of Fuzzy Systems**

Due to a wide range of possible applications there are many different types of fuzzy systems that have been proposed in the literature thus far [4, 16, 22, 23, 31]. But new solutions characterized by decreased computation complexity, improved modeling quality, or greater ease of the linguistic interpretation of the inference results are still the topic of research. The model proposed by E.H. Mamdani and S. Assilan [19] is generally regarded as the first fuzzy system presented in the literature. Currently, it can be considered as the foundation of the fuzzy models family based on if-then rules with fuzzy sets in antecedents as well as consequents.

#### *2.4.1 Mamdani–Assilan Fuzzy Model*

The Mamdani–Assilan fuzzy system (MAFS) uses a set of conditional fuzzy rules in the canonical form (2.20), which can be determined by a human expert. The MAFS is based on the conjunctive interpretation of fuzzy rules, where the conjunctive "and" of a rule antecedent is defined with the *t*-norm minimum (∧). The inference results from individual rules are aggregated by applying the *s*-norm maximum (∨). The numerical inputs **x**<sup>0</sup> = [*x*01, *x*02,..., *x*0*<sup>N</sup>* ] are mapped into fuzzy sets with the singleton fuzzifier, and the numerical outcome is calculated using the COG method. The approximate reasoning schema is realized on the basis of Eq. (2.40), which takes the form:

$$
\mu\_{\mathcal{B}'}\left(\mathbf{y}\right) = \bigvee\_{i=1}^{l} \left[\mu\_{\mathbf{A}^{(i)}}\left(\mathbf{x}\_{0}\right) \wedge \mu\_{\mathcal{B}^{(i)}}\left(\mathbf{y}\right)\right],\tag{2.49}
$$

where

$$
\mu\_{\mathbf{A}^{(i)}}(\mathbf{x}\_0) = \mu\_{A\_1^{(i)}}(\mathbf{x}\_{01}) \wedge \mu\_{A\_2^{(i)}}(\mathbf{x}\_{02}) \wedge \dots \wedge \mu\_{A\_N^{(i)}}(\mathbf{x}\_{0N}) \,. \tag{2.50}
$$

The above equation defines the so-called firing strength of the *i*th rule, denoted as *F*(*i*) (**x**0). Hence, the formula (2.49) can also be written as

$$\mu\_{B'}\left(\mathbf{y}\right) = \bigvee\_{i=1}^{I} \left[ F^{(i)}\left(\mathbf{x}\_{0}\right) \wedge \mu\_{B^{(i)}}\left(\mathbf{y}\right) \right]. \tag{2.51}$$

Using the COG defuzzification we get:

$$\chi\_0 = \frac{\int\_{\stackrel{\!\!\! }{}} \text{ y } \mu\_{B'}\left(\text{y}\right) d\text{y}}{\int\_{\stackrel{\!\!\! }{}} \mu\_{B'}\left(\text{y}\right) d\text{y}}.\tag{2.52}$$

**Fig. 2.3** Example of fuzzy inference using the Mamdani–Assilan fuzzy system with two inputs and the knowledge base consisting of two conditional fuzzy rules

Figure 2.3 shows an example of fuzzy inference using MAFS with two inputs and the knowledge base consisting of two conditional fuzzy rules.

The defuzzification requires high computational complexity, however, some simplifications can be applied. Using the algebraic product *t*-norm and the arithmetic mean as the aggregation operator we obtain a Larsen fuzzy system, which is defined as [16]:

$$\mu\_{B'}\left(\mathbf{y}\right) = \frac{1}{I} \sum\_{i=1}^{I} F^{(i)}\left(\mathbf{x}\_0\right) \mu\_{B^{(i)}}\left(\mathbf{y}\right). \tag{2.53}$$

By substitution of (2.53) into (2.52) we get:

$$\mathbf{y}\_0 = \frac{\sum\_{i=1}^I F^{(i)}\left(\mathbf{x}\_0\right) \int\_{\stackrel{\mathcal{Y}}{\ Y}} \mathbf{y}\,\mu\_{B^{(i)}}\left(\mathbf{y}\right) d\mathbf{y}}{\sum\_{j=1}^I F^{(j)}\left(\mathbf{x}\_0\right) \int\_{\stackrel{\mathcal{Y}}{\ Y}} \mu\_{B^{(j)}}\left(\mathbf{y}\right) d\mathbf{y}}.\tag{2.54}$$

Denoting the area under a membership function of the fuzzy set *B*(*i*) (*y*) as

$$\mathcal{A}'(\mu\_{\mathcal{B}^{(i)}}(\mathbf{y})) = \int\_{\mathbb{Y}} \mu\_{\mathcal{B}^{(i)}}(\mathbf{y}) \, d\mathbf{y},\tag{2.55}$$

and its center of gravity as *y*(*i*) , we can write:

$$y\_0 = \frac{\sum\_{i=1}^I F^{(i)}\left(\mathbf{x}\_0\right) \mathcal{A}'\left(\mu\_{\mathcal{B}^{(i)}}\left(\mathbf{y}\right)\right) \text{ y}^{(i)}}{\sum\_{j=1}^I F^{(i)}\left(\mathbf{x}\_0\right) \mathcal{A}'\left(\mu\_{\mathcal{B}^{(j)}}\left(\mathbf{y}\right)\right)}.\tag{2.56}$$

The above solution requires only a single calculation of the areas under the membership functions and centers of gravity locations for all fuzzy rules. By assuming additionally that *A* (μ*B*(*i*) (*y*)) are the same for all *I* consequents, we get the Sugeno– Yasukawa fuzzy model [26].

Approximate reasoning without the defuzzification necessity was presented in papers by Takagi and Sugeno [27] and Sugeno and Kang [25]. The proposed model, called the Takagi–Sugeno–Kang fuzzy system (TSKFS), is described in the following subsection.

#### *2.4.2 Takagi–Sugeno–Kang Fuzzy System*

The knowledge base of the TSKFS consists of conditional fuzzy rules with the consequents in the form of classical functions, the arguments of which are the input numerical data:

$$\mathcal{R} = \left\{ \boldsymbol{R}^{(i)} \right\}\_{i=1}^{I} = \left\{ \text{if } \bigwedge\_{n=1}^{N} \left( \mathbf{x}\_{0n} \text{ is } L\_{A\_n}^{(i)} \right), \text{ then } \mathbf{y} = \mathbf{y}^{(i)} \text{ (x}\_0 \text{)} \right\}\_{i=1}^{I} \,, \tag{2.57}$$

where *x*0*<sup>n</sup>* is an input singleton, **x**<sup>0</sup> = [*x*01, *x*02,..., *x*0*<sup>N</sup>* ] , and *y*(*i*) (**x**)is the function in the *i*th consequent.

The output of each fuzzy rule is a crisp numerical datum *y* = *y*(*i*) (**x**0), and the TSKFS outcome is calculated as a weighted average of individual outputs:

$$\mathbf{y}\_0 = \frac{\sum\_{i=1}^I F^{(i)}\begin{pmatrix} \mathbf{x}\_0 \end{pmatrix} \mathbf{y}^{(i)}\left(\mathbf{x}\_0\right)}{\sum\_{j=1}^I F^{(j)}\begin{pmatrix} \mathbf{x}\_0 \end{pmatrix}},\tag{2.58}$$

where

$$F^{(i)}\left(\mathbf{x}\_{0}\right) = \mu\_{A\_{1}^{(i)}}\left(\mathbf{x}\_{01}\right) \star\_{T} \mu\_{A\_{2}^{(i)}}\left(\mathbf{x}\_{02}\right) \star\_{T} \cdots \star\_{T} \mu\_{A\_{N}^{(i)}}\left(\mathbf{x}\_{0N}\right),\tag{2.59}$$

is the firing strength and -*<sup>T</sup>* is a *t*-norm (usually a minimum or algebraic product).

Equation (2.58) can be interpreted as a mixture of experts, each modeled by a single fuzzy rule. Each rule defines the relationship between outputs and inputs of the system in the relevant input range. The weighted average of statements from all local experts (rules) determines the reasoning result. The weight, represented by the firing strength of the rule, specifies the influence level of a single expert on the final inference outcome.

The consequent of the *i*th TSKFS fuzzy rule can also be understood as a singleton [4], the location of which is determined by the function *y*(*i*) (**x**):

$$\mu\_{B^{(i)}}\left(\mathbf{y}\right) = \delta\_{\mathbf{y}, \mathbf{y}^{(i)}} = \begin{cases} 1, \ y = \mathbf{y}^{(i)}\left(\mathbf{x}\_{0}\right), \\ 0, \ y \neq \mathbf{y}^{(i)}\left(\mathbf{x}\_{0}\right). \end{cases} \tag{2.60}$$

Hence, the TSKFS is usually referred to as the fuzzy system with "moving" singletons. The term "moving" relates to the relationship between a singleton location and the input numerical data. The amplitude (height) of the singleton after the approximate reasoning is defined by the firing strength of a rule.

The TSKFS consequents are frequently defined as linear functions (first-order polynomials):

$$\mathbf{p}^{(i)}\left(\mathbf{x}\_{0}\right) = p\_{0}^{(i)} + p\_{1}^{(i)}\mathbf{x}\_{01} + p\_{2}^{(i)}\mathbf{x}\_{02} + \cdots + p\_{N}^{(i)}\mathbf{x}\_{0N} = \mathbf{p}^{(i)\top}\mathbf{x}\_{0}^{\prime},\tag{2.61}$$

where **p**(*i*) is the (*N* + 1)-dimensional vector of parameters of the function *y*(*i*) (**x**), and **x** <sup>0</sup> denotes the extended input vector:

$$\mathbf{x}\_0' = \begin{bmatrix} 1 \ \mathbf{x}\_0 \end{bmatrix}^\top. \tag{2.62}$$

A collection of simple linear functions *y*(*i*) (**x**) allows for modeling the most complex input–output relationships. Overlapping areas of antecedents in neighboring rules ensure smooth switching between the local models.

An example of TSKFS inference with two inputs and two conditional fuzzy rules is shown in Fig. 2.4. The main advantage of the TSKFS is the low computational effort required to determine the numerical output of the system as the inference process does not involve defuzzification. However, it does not allow for the application of different interpretations of the fuzzy rules and different types of aggregation operators. This is due to the application of singletons in the rules consequents. The artificial neural network based fuzzy inference system (ANNBFIS) [17] is devoid of such disadvantages. The ANNBFIS combines the benefits of the usage of a fuzzy set in the rule consequent (as in the MAFS) together with the dependency of the consequent location on system inputs (as in the TSKFS) [4, 15, 16]. Another extension of the

**Fig. 2.4** An example of approximate reasoning with Takagi–Sugeno–Kang fuzzy system with two inputs and two fuzzy if-then rules

TSKFS is the Tsukamoto fuzzy system (TFS) [28]. The main difference between TSKFS and TFS is the method of determining the singleton location in the consequent of the fuzzy rule. In TFS it is defined using a monotonic function as well as a firing strength of the rule.

#### *2.4.3 Tsukamoto Fuzzy System*

The knowledge base of TFS is a collection of fuzzy conditional statements in the form:

$$\mathcal{R}^{(i)} = \text{if } \bigwedge\_{n=1}^{N} \left( \mathbf{x}\_{0n} \text{ is } L\_{A\_n}^{(i)} \right), \text{ then } \mathbf{y} = f\_i^{-1} \left( F^{(i)} \left( \mathbf{x}\_0 \right) \right), \tag{2.63}$$

where *fi* (*y*) is a monotonic function in the *i*th consequent.

For the firing strength equal to *F*(*i*) (**x**0) the consequent is a singleton with the amplitude *F*(*i*) (**x**0) and the location *y*(*i*) such that *F*(*i*) (**x**0) = *fi* - *y*(*i*) :

40 R. Czabanski et al.

$$\mu\_{B^{(i)}}\left(\mathbf{y}\right) = F^{(i)}\left(\mathbf{x}\_{0}\right)\,\delta\_{\mathbf{y},\mathbf{y}^{(i)}} = \begin{cases} F^{(i)}\left(\mathbf{x}\_{0}\right), \,\mathbf{y} = \mathbf{y}^{(i)},\\ 0, \qquad \mathbf{y} \neq \mathbf{y}^{(i)}, \end{cases} \tag{2.64}$$

where *<sup>y</sup>*(*i*) <sup>=</sup> *<sup>f</sup>* <sup>−</sup><sup>1</sup> *i* - *F*(*i*) (**x**0) .

The inference outcome of the TFS is calculated as a weighted average of singleton locations from all rules, with weights defined as the rules firing strengths:

$$\mathbf{y}\_0 = \frac{\sum\_{i=1}^I F^{(i)}\begin{pmatrix} \mathbf{x}\_0 \end{pmatrix} \mathbf{y}^{(i)}}{\sum\_{j=1}^I F^{(j)}\begin{pmatrix} \mathbf{x}\_0 \end{pmatrix}} = \frac{\sum\_{i=1}^I F^{(i)}\begin{pmatrix} \mathbf{x}\_0 \end{pmatrix} \ f\_i^{-1}\begin{pmatrix} F^{(i)}\begin{pmatrix} \mathbf{x}\_0 \end{pmatrix} \end{pmatrix}}{\sum\_{j=1}^I F^{(j)}\begin{pmatrix} \mathbf{x}\_0 \end{pmatrix}}. \tag{2.65}$$

An example of the Tsukamoto approximate reasoning with two inputs and two fuzzy if-then rules is shown in Fig. 2.5.

The TFS is rarely used due to the difficulty in obtaining the conditional fuzzy rules from a human expert in the form (2.63). For the same reasons the Baldwin fuzzy system (BFS) [1, 2] is difficult to apply in practice. The BFS represents a

**Fig. 2.5** Example of the Tsukamoto approximate reasoning with two inputs and two fuzzy if-then rules

different approach to fuzzy modeling, which is not based on Zadeh's compositional rule of inference but on reasoning using fuzzy truth value restrictions. The literature describes many other interesting proposals of fuzzy models, including those based on interval-valued fuzzy sets and type-2 fuzzy sets. A detailed overview can be found, for example, in [13, 18, 29, 30].

#### **2.5 Summary**

In this chapter we discussed basic problems related to the idea of fuzzy systems based on the Zadeh compositional rule of inference. The presentation started with explaining the concepts of the linguistic variable and fuzzy conditional statement. Next, different types of the fuzzy if-then rules and various methods of their mathematical representation were presented. Also, an overview of the compositional rule of inference proposed by Zadeh was introduced. General theoretical considerations on approximate reasoning were supplemented with examples of elementary fuzzy models. We described the basic solutions being the foundation of many modern constructions including fuzzy systems of Mamdani–Assilan, Takagi–Sugeno–Kang, and Tsukamoto.

**Acknowledgements** This work was supported by the Ministry of Science and Higher Education funding for statutory activities (BK-220/RAu-3/2016).

#### **References**


#### 2 Introduction to Fuzzy Systems 43

**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Part II Theory of Ordered Fuzzy Numbers**

# **Chapter 3 Ordered Fuzzy Numbers: Sources and Intuitions**

**Piotr Prokopowicz and Dominik Sl¸ ´ ezak**

**Abstract** Most emerging methodologies, before they become well settled, stem from careful analysis of previous solutions. In that respect, this chapter refers to the roots of the Ordered Fuzzy Number (OFN) model. First, we outline some drawbacks of the most popular fuzzy number representations, which inspired us to search for a new approach. Then we discuss the idea of looking at fuzzy numbers from an alternative viewpoint. This leads towards formulation of the OFN model comprising three conceptual steps: (1) representing membership functions of fuzzy numbers as the pairs of increasing/decreasing components; (2) for each of two components treated as a locally defined function, inverting the meanings of its domain and its set of values; and finally (3) treating the obtained pairs of components as the ordered pairs. By introducing arithmetic operations on such ordered pairs, we obtain the framework, which is in many cases equivalent to the previous approaches but it also enables the representation of new information aspects.

## **3.1 Introduction**

The Ordered Fuzzy Number (OFN) model was defined as a result of searching for simple and flexible algorithms performing calculations on fuzzy numbers [10]. A more formal description of the OFN model is provided in Chap. 1. Here we focus on initial inspirations, which can be helpful to understand the meaning behind mathematical formulas for OFN operations. Indeed, if someone with a thorough background in the theory of fuzzy sets jumps immediately to Sect. 3.5, the first impression might be confusing. Thus we encourage the readers to study the contents of this chapter

P. Prokopowicz (B)

Institute of Mechanics and Applied Computer Science, Kazimierz Wielki University, Bydgoszcz, Poland e-mail: piotrekp@ukw.edu.pl

D. Sl¸ ´ ezak Faculty of Mathematics, Informatics and Mechanics, University of Warsaw, Warsaw, Poland e-mail: slezak@mimuw.edu.pl

© The Author(s) 2017 P. Prokopowicz et al. (eds.), *Theory and Applications of Ordered Fuzzy Numbers*, Studies in Fuzziness and Soft Computing 356, DOI 10.1007/978-3-319-59614-3\_3 step by step, in order to realize that the considered model developed primarily by Witold Kosi´nski is truly straightforward and easy to handle.

The chapter is organized as follows. In Sect. 3.2, some potential drawbacks of classically defined fuzzy numbers are explained. In Sect. 3.3, some alternative proposals regarding how to deal with those drawbacks are outlined. In Sect. 3.4, we discuss an idea of decomposing the shapes of fuzzy numbers onto ascending/constant/descending components, that is, expressing fuzzy membership functions in so-called *quasi-invertible* form that was utilized to redefine fuzzy numbers in [11]. In Sect. 3.5, we discuss how the idea of operating with quasi-invertible functions led us towards the OFN model. Section 3.6 concludes the chapter.

#### **3.2 Problems with Calculations on Fuzzy Numbers**

Basic operations on standard fuzzy numbers were discussed in Chap. 1. Two popular mechanisms of introducing them were mentioned: via the extension principle [3] and via interval calculations on α-cuts [1]. In both cases, for both addition and subtraction operations, their outcomes support increases compared to their inputs. Thus, their fuzziness increases. After performing several calculation steps, a resulting number's support usually becomes extremely broad, whereby information represented by that number is no longer practically useful.

In [12], we can find a more general summary of problems with original approaches to fuzzy arithmetics. Certainly, those problems can be handled using some more advanced models, thus propagation of fuzziness becomes more tractable during computations [21]. It should also be noted that standard fuzzy arithmetic methods turned out to be very useful in a number of practical applications [7]. Nevertheless, in some cases, one may require more straightforward tools for limiting or – sometimes – even reversing a degree of imprecision represented by fuzzy numbers. This observation inspired us to search for a new way of representing and computing fuzzy numbers. Two major goals in front of us were:


The general concept that allowed us to control imprecision during calculations can be interpreted as a kind of direction of fuzziness [18]. Chapter 4 contains a complete description of that idea from a mathematical perspective. It shows how the considered OFN model allows us to think about canceling fuzziness while adding/subtracting opposite or reversed fuzzy numbers. The remainder of this chapter can be treated as introductory background for that formalism.

#### **3.3 Related Work**

Let us present a short preview of other existing approaches to deal with the problem of increasing imprecision during fuzzy calculations. Generally, we can categorize such approaches as those refining standard operations [21], those introducing new operations [19], and those specifying a kind of context of operations [8].

In [19], two additional operations on fuzzy numbers were introduced: nonstandard subtraction and nonstandard division. Those operations are quite complicated but indeed it is true that, for fuzzy numbers *A*, *B*, *C*, equation *A* + *B* = *C* is equivalent to equation *C* - *B* = *A*, where denotes nonstandard subtraction. In our research, we kept looking for another solution, as it is not always a good idea to introduce new operations. It may be problematic from both conceptual and technical perspectives. In the space of real numbers, subtraction is equivalent to addition of an opposite number. By analogy, there should be no need to define a separate subtraction operation for fuzzy numbers. The same reasoning can be carried out for multiplication and division. This can be represented by requirements of a form *A* − *B* = *A* + (−*B*) and *A*/*B* = *A* · *B*−1, which are not addressed in [19].

In [8], Klir presented another approach to operations on fuzzy numbers (by means of fuzzy intervals). His idea takes into account a context of relationship between two numbers – referred to as a *requisite constraint* – which may optionally allow a decrease of fuzziness in calculations. It is effective in solving equations of a type *A* + *X* = *B*, if we know that *X* = *B* − *A*. However, just as above, this method may make calculations complicated. The assumption that we are able to set up requisite constraints for all relevant pairs of quantities for a given calculation is difficult to track for more complex scenarios. Still, the ideas proposed in [8] seem to be closer to our way of understanding operations on fuzzy numbers than those in the case of [19]. However, in the OFN model, additional information, a kind of context, is assigned to particular numbers rather than relationships between them.

The above ideas became a source of our inspiration in 2000–2003, when the OFN model was formulated. However, the problem of expanding fuzziness is also present in more recent research. For instance, Dymova et al. proposed the operation called *interval extended zero* [6]. It is used to solve linear fuzzy equations. As another example, Piegat and Landowski utilized RDM (*relative distance measure*) interval arithmetics [15]. Furthermore, Stupnanova combined fuzzy operations with probabilistic modeling [20]. Such methods should be compared to the OFN model in a more detailed way. However, we should remember that all of them aim at better controlling rather than eliminating/reversing fuzziness during calculations.

#### **3.4 Decomposition of Fuzzy Memberships**

The remaining sections include some basic observations and suggestions on how to change standard representation and meaning of fuzzy numbers. We start by recalling the original concept of a fuzzy set [22]. Then we concentrate on the nature of shapes of standard fuzzy numbers. Finally, we introduce a new representation based on the already-mentioned inversion of the roles between the domains and the sets of values for particular components of those shapes.

As we know, a fuzzy set *A* over a space *X* is defined as a set of pairs, namely *A* = {(*x*, μ*A*(*x*)) : *x* ∈ *X*}, where μ*<sup>A</sup>* : *X* → [0, 1] denotes a fuzzy membership function that assigns to each element *x* ∈ *X* its degree of membership to *A*. In Sect. 3.5, we refer to a more general understanding of fuzzy sets. However, for now let us follow the above formulation and consider a fuzzy number as a fuzzy set over the space of real numbers R1:

$$A = \{ (\mathbf{x}, \mu\_A(\mathbf{x})) : \mathbf{x} \in \mathbb{R} \}\tag{3.1}$$

As pointed out in Chap. 1, each fuzzy number *A* is supposed to be a normal fuzzy set; that is, there exists *<sup>x</sup>* <sup>∈</sup> <sup>R</sup> such that <sup>μ</sup>*A*(*x*) <sup>=</sup> 1. Moreover, its support should be bounded: that is, there exists interval (*sA*, *eA*) such that μ*A*(*x*) >0, if and only if *x* ∈ (*sA*, *eA*). <sup>2</sup> Finally, *A* is supposed to be a convex fuzzy set and its membership function should be piecewise continuous.

The convexity of *A* corresponds to the strict quasi-concavity of function μ*<sup>A</sup>* or, equivalently, the strict quasi-convexity of function −μ*<sup>A</sup>* [4]. Detailed properties of strict quasi-convexity can be found, for example, in [13]. Saying that function −μ*<sup>A</sup>* is strictly quasi-convex (and μ*<sup>A</sup>* is strictly quasi-concave) means:

$$\forall \mathbf{x}\_{\mathbf{x}, \mathbf{y}, \mathbf{z} \in \mathbb{R}} \left( \mathbf{x} < \mathbf{y} < \mathbf{z} \land \mu\_A(\mathbf{x}) \neq \mu\_A(\mathbf{z}) \right) \Rightarrow \left( \mu\_A(\mathbf{y}) > \min(\mu\_A(\mathbf{x}), \mu\_A(\mathbf{z})) \right) \tag{3.2}$$

Figure 3.1 illustrates a difference between functions that are convex/concave and strictly quasi-convex/quasi-concave.

According to one of the theorems proved in [13], the fuzzy membership function μ*<sup>A</sup>* is strictly quasi-concave within a convex set *X*, if and only if any segment (*x*1, *x*2] ⊆ *X* can be divided into three sections such that μ*<sup>A</sup>* is increasing in the first, constant in the second, and decreasing in the third section. Moreover, any one or two of these sections may be empty or degenerated to a single point. Thus, one can conclude that for a given fuzzy number *A* we have values 1<sup>−</sup> *<sup>A</sup>*, 1<sup>+</sup> *<sup>A</sup>* ∈ (*sA*, *eA*)such that μ*<sup>A</sup>* has an increasing part defined over (*sA*, 1<sup>−</sup> *<sup>A</sup>*) and a decreasing part over (1<sup>+</sup> *<sup>A</sup>*, *eA*). There is also a constant part equal to 1 over the interval (or a single point) [1<sup>−</sup> *<sup>A</sup>*, 1<sup>+</sup> *A*].

The above kind of piecewise representation goes well together with some other approaches to model fuzzy arithmetics, for example, by means of so-called L-R numbers [5]. For more details on this methodology, let us refer to [2], where L-R numbers are thoroughly compared to the OFN model. From our perspective, it is especially interesting that both increasing and decreasing parts of strictly quasi-concave fuzzy -

<sup>1</sup>In the literature, fuzzy numbers are often denoted by *A* . However, as in our case it does not lead to any misunderstanding, we simply use notation *A*.

<sup>2</sup>*sA* and *eA* can be intuitively regarded as a *start* and *end* of *A*. Analogous notation is used in Chap. 4, along with 1− *<sup>A</sup>* and 1<sup>+</sup> *<sup>A</sup>*. However, inequalities *sA* < 1<sup>−</sup> *<sup>A</sup>* ≤ 1<sup>+</sup> *<sup>A</sup>* < *eA* that hold for standard fuzzy numbers will not need to be true in the OFN model.

**Fig. 3.1** Examples of functions that are strictly quasi-convex but not convex (*left*) and strictly quasi-concave but not concave (*right*)

membership functions are invertible. Such characteristics are hereinafter referred to as quasi-invertibility. This enables us to define operations on inverted parts of fuzzy numbers' membership functions.


The above mechanism was studied in the literature as an alternative way of thinking about fuzzy arithmetics [11]. Although conceptually it does not change the standard model, it turns out to be very simple to implement in practice. It is also the best starting point for explaining the OFN model.

#### **3.5 Idea of Ordered Fuzzy Numbers**

The quasi-invertibility-based addition procedure recalled in Sect. 3.4 could be alternatively rewritten by representing fuzzy numbers *A* and *B* as unordered pairs of piecewise continuous monotonic functions *<sup>f</sup> <sup>A</sup>*, *gA* : [0, <sup>1</sup>] → <sup>R</sup> and *fB*, *gB* : [0, <sup>1</sup>] → <sup>R</sup>. In the first step, we would then need to check which of those functions are increasing/decreasing in order to obtain a valid result. However, it would not yet solve the issue of propagation of imprecision in computations, which was one of our main motivations while searching for a new model of fuzzy arithmetics.

Let us go back for a while to the discussion in Sect. 3.3. Let us note that one of the requirements to limit imprecision corresponds to a need of introducing opposite fuzzy numbers, that is, for each *A*, defining fuzzy number −*A* such that *A* + (−*A*) = *A* − *A* = **0**, where **0** denotes the fuzzy number representation of crisp 0.

**Fig. 3.2** Example of adding standard fuzzy numbers using quasi-invertibility

**Fig. 3.3** Example of adding two OFNs. The result is comparable to that obtained in Fig. 3.2

As expressing opposite numbers is hardly possible in standard fuzzy arithmetics, let us consider a slightly revised notion of fuzzy number. The following definition includes an imposed order between components representing fuzzy numbers. This order may be regarded as an additional aspect of information – a kind of fuzzy number's context – which is independent of the values of fuzzy memberships. Let us also note that fuzzy number components are now defined in an inverted way when compared to standard fuzzy numbers.

**Fig. 3.4** Example of adding two OFNs, where *B* has a reversed order compared to Fig. 3.3

**Definition 1** (*Ordered Fuzzy Number*) *A* = ( *f <sup>A</sup>*, *gA*) is an ordered pair of continuous functions *<sup>f</sup> <sup>A</sup>*, *gA* : [0, <sup>1</sup>] → <sup>R</sup>, called the **up part**, and the **down part** of *<sup>A</sup>*, respectively.<sup>3</sup>

The shape related to the pair ( *f <sup>A</sup>*, *gA*) is not different from the case of (*gA*, *fA*). However, these are two different OFNs (unless *f <sup>A</sup>* = *gA*). They differ by something that can be interpreted as *direction*, in some papers also called *orientation*. Actually, interpretation related to *direction* inspired some researchers to propose renaming the presented model as *directed fuzzy numbers* or *fuzzy numbers with direction*. Moreover, in papers [16–18], the name*Kosi ´nski's Fuzzy Numbers*is used to honor the contribution of Witold Kosi ´nski in a development of the considered model. Although in this book we keep the original OFN terminology, we believe that the discussion about the most appropriate name is not over.

Let us notice that it is now possible to define *A*'s opposite as −*A* = ( *f*−*<sup>A</sup>*, *g*−*<sup>A</sup>*), where *f*−*<sup>A</sup>* = − *f <sup>A</sup>* and *g*−*<sup>A</sup>* = −*gA*. In a standard model, while adding such numbers represented as unordered pairs *<sup>f</sup> <sup>A</sup>*, *gA* : [0, <sup>1</sup>] → <sup>R</sup> and *<sup>f</sup>*−*<sup>A</sup>*, *<sup>g</sup>*−*<sup>A</sup>* : [0, <sup>1</sup>] → <sup>R</sup>, we would need to combine *f <sup>A</sup>* with *g*−*<sup>A</sup>* and *gA* with *f*−*<sup>A</sup>*. However, in the OFN model – as formally introduced in Chap. 4 – we follow the ordering of component functions rather than their increasing/decreasing characteristics. Figures 3.3 and 3.4 illustrate more examples. We can see that the ordering of components defining a fuzzy number


<sup>3</sup>Notation *<sup>A</sup>* <sup>=</sup> ( *fA*, *gA*) reflects the original way of referring to the up and down parts introduced in [10]. Surely, one could also think about a more intuitive naming, for example, ↑*<sup>A</sup>* and ↓*<sup>A</sup>* instead of *fA* and *gA*, respectively. One could also think about denoting OFNs in a different way, such as using sign above *A* (by analogy to *A* ; see the footnote in Sect. 3.5). Nevertheless, by writing *A* = ( *fA*, *gA*) we wish to keep consistency with the previous materials.

can have a huge influence on results, including the opportunity to reverse fuzziness, that is, to have outputs that are crisper than inputs.

In our previous works, we paid special attention to direction-related interpretation of OFNs, that is, the above-mentioned new aspect of information that enables us to distinguish between pairs ( *f <sup>A</sup>*, *gA*) and (*gA*, *fA*). One possibility is to refer here to a *trend* of fuzzy observation or measurement [9]. Indeed, decomposition of a fuzzy number's membership function onto two ordered components establishes an interesting background for representation of a trend by means of the up part, which is a natural beginning, and the down part, which is a natural end of observation. For example, by reversing the ordering of the OFN's components one might specify whether a given observed imprecise value is generally likely to increase or decrease. Surely, one could claim that such information is expressible also in classical fuzzy logic by adding new trend-related linguistic variables. However, that would result in a more complex fuzzy-rule-based representation, leading towards a less intuitive framework for conducting arithmetic calculations on measurements.

We refer to Chap. 4 for further details on possible interpretations of information represented by the OFN model. For now, let us add that by introducing an order of components ( *f <sup>A</sup>*, *gA*) and, this way, letting *A*'s up and down parts be potentially both increasing and decreasing, we enter a far richer space of outcomes of arithmetic calculations. In Chap. 4 we show that operations on such ordered pairs may lead towards results that are not interpretable as standard fuzzy numbers, as some elements of R correspond to multiple memberships. One could think of it as a special case of some extensions of fuzzy set theory [14]. One could also refer to original ideas of Lotfi A. Zadeh who, in his paper [22], stated that "The concept in question is that of fuzzy set, that is a 'class' with a continuum of grades of membership." Thus, the OFN model could be interpreted as a new way of assigning real numbers with the *continuum of grades of membership*. Certainly, further theoretical studies in this respect are necessary as well.

#### **3.6 Summary**

In this chapter, we recalled the roots of the Ordered Fuzzy Number (OFN) model [10]. We outlined disadvantages of standard fuzzy arithmetics and discussed how to look at fuzzy numbers in an alternative way, by representing them as ordered pairs of functions that encode the shapes of fuzzy memberships. In this way, we obtained a mathematical framework that extends the standard approach including a new type of information referred to as a direction of a fuzzy number [18]. We showed a kind of evolution of our way of thinking about fuzzy arithmetics, starting from the classical approach, via quasi-invertible representation of convex fuzzy numbers, and finishing with formal definition of OFNs. We also discussed how the obtained model lets us better manage degrees of imprecision during calculations and how one could interpret fuzzy numbers' direction.

3 Ordered Fuzzy Numbers: Sources and Intuitions 55

## **References**


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Chapter 4 Ordered Fuzzy Numbers: Definitions and Operations**

**Piotr Prokopowicz and Dominik Sl¸ ´ ezak**

**Abstract** We outline basic notions and assumptions related to the Ordered Fuzzy Number (OFN) model. Definitions of mathematical operations, several interpretations of their results, as well as additional OFN parameters are presented. Some of them, such as inclination or order, are specific to OFNs, whereas others are equivalent to those present in the well-known convex fuzzy number model. An important aspect of this part is also a discussion of algebraic properties of the OFN model.

#### **4.1 Introduction**

In previous works, we noted that original fuzzy arithmetic operations could have some limitations. Those limitations were recognized and addressed in different ways [17, 25]. Many researchers agree that calculations involving fuzzy numbers should accumulate uncertainty, by compliance with the meaning of a fuzzy number as a distribution of possibilities [26, 27]. Indeed, this assumption occurs in almost all interpretations of fuzziness [4, 5]. Although it seems to be natural for many applications, we would like to point out that in some scenarios it would be truly useful to derive crisper information from fuzzier inputs, that is, to reverse the uncertainty accumulation process. We believe that by allowing such reversing one would obtain a kind of general mathematical model of fuzzy numbers, which – depending on practical needs – can possess more or less constrained properties.

Following the above way of thinking, we have been seeking a framework that would include standard fuzzy numbers as special cases. One of the possibilities for building such a broader space of fuzzy numbers is to rely on the Ordered Fuzzy

P. Prokopowicz (B)

Institute of Mechanics and Applied Computer Science, Kazimierz Wielki University, Bydgoszcz, Poland e-mail: piotrekp@ukw.edu.pl

D. Sl¸ ´ ezak Faculty of Mathematics, Informatics and Mechanics, University of Warsaw, Warsaw, Poland e-mail: slezak@mimuw.edu.pl

© The Author(s) 2017

P. Prokopowicz et al. (eds.), *Theory and Applications of Ordered Fuzzy Numbers*, Studies in Fuzziness and Soft Computing 356, DOI 10.1007/978-3-319-59614-3\_4 Number (OFN) model [13, 15], that is, proceed with decomposition of membership functions of fuzzy numbers onto ordered components. By treating those components as an ordered pair, it becomes possible to model the fuzzy number opposites better, canceling each other out instead of growing their fuzziness. In this chapter, we look at such capabilities of OFNs from a mathematical perspective and discuss basic properties and examples of OFN arithmetic operations in order to illustrate computational straightforwardness and representative richness of the considered approach. We also pay attention to the role of those objects in the space of OFNs that do not correspond to fuzzy numbers understood as standard fuzzy sets.

The chapter is organized as follows. In Sect. 4.2, we recall preliminary concepts of the OFN model. In Sect. 4.3, we discuss how to redefine fundamental notions of fuzzy sets and numbers for OFNs. In Sect. 4.4, we focus on OFNs that are not expressible by means of standard fuzzy numbers and, in particular, we show how to transform them into a convex fuzzy set format. In Sect. 4.5, we outline basic arithmetic operations and discuss the corresponding algebraic properties of the OFN model. In Sect. 4.6, we discuss the notion of the OFN's direction from the perspective of practical applications. Section 4.7 concludes this part.

#### **4.2 The Ordered Fuzzy Number Model**

As already recalled in Chap. 3, the considered idea of an alternative way of looking at fuzzy arithmetics is based on the notion:

**Definition 4.1** An **Ordered Fuzzy Number** (**OFN**) *A* is an ordered pair

$$A = (f\_A, \mathbf{g}\_A) \tag{4.1}$$

of continuous functions *<sup>f</sup> <sup>A</sup>*, *gA* : [0, <sup>1</sup>] → <sup>R</sup>, called the **up part**, and the **down part** of *A*, respectively.

It follows from the continuity of *f <sup>A</sup>* and *gA* that their images are bounded intervals. Let us denote them as *U PA* = *f <sup>A</sup>*([0, 1]) and *DOWNA* = *gA*([0, 1]) (see Fig. 4.1).

Considering functions *f <sup>A</sup>* and *gA* as an ordered pair is the crucial difference in comparing to standard fuzzy numbers that can be represented by means of so-called *L-R notation* [4]. By *L* and *R* one means left (increasing) and right (decreasing) components of a membership function of a given fuzzy number. Such components can be inverted to form functions assigning real values to the elements of the unit interval [0, 1] [16]. Standard arithmetic operations on such represented fuzzy numbers are then defined over the pairs of increasing components and the pairs of decreasing components. This means that in the classical framework it is impossible to add, for example, an increasing component of a fuzzy number *A* to a decreasing component of another fuzzy number *B*. In the case of OFNs, such operations are allowed.

As discussed in Chap. 3, shapes related to pairs ( *f <sup>A</sup>*, *gA*) and (*gA*, *fA*) are the same. However, they differ by something that can be interpreted as *direction*. This

new kind of information can be additionally marked graphically with arrows. It can be seen in Fig. 4.2, which illustrates the following operation.

**Definition 4.2 Reversal of direction** of *A* = ( *f <sup>A</sup>*, *gA*) consists in replacing its up part ( *f <sup>A</sup>*) and down part (*gA*) with each other. The resulting OFN *A*| <sup>−</sup> = ( *f <sup>A</sup>*<sup>|</sup> <sup>−</sup> , *gA*<sup>|</sup> − ) is defined as follows, for each α ∈ [0, 1],

$$f\_{A|^{-}}(\alpha) = g\_A(\alpha) \qquad g\_{A|^{-}}(\alpha) = f\_A(\alpha) \tag{4.2}$$

*A*| <sup>−</sup> is called an *OFN of reversed direction* or a *reversed OFN*.

To distinguish between different types of OFN directions, let us also introduce the following characteristics. Herein, parameters *sA* = *f <sup>A</sup>*(0), *eA* = *gA*(0) (*s* / *e* stands for start/end) and 1<sup>−</sup> *<sup>A</sup>* = *f <sup>A</sup>*(1), 1<sup>+</sup> *<sup>A</sup>* = *gA*(1) (− / + stands for *reaching*/*leaving* a precise component of a fuzzy number) are useful.

**Definition 4.3** For a given *A* = ( *f <sup>A</sup>*, *gA*), we say that:


The above rules define some specific cases of *strict* direction. Certainly, one can notice that the reversal operation changes directions; that is, if *A* is strictly positive

(negative), then *A*| <sup>−</sup> is strictly negative (positive). However, one can also imagine pairs ( *f <sup>A</sup>*, *gA*) that do not follow any such neutral/positive/negative characteristics. For example, one can consider a situation where *f <sup>A</sup>* = *gA* and at the same time there is *sA* = 1<sup>−</sup> *<sup>A</sup>* = 1<sup>+</sup> *<sup>A</sup>* = *eA*. Although such pairs do not possess a strict direction, they can play an important role in fuzzy arithmetic operations.

Another notion that was introduced within the OFN model is *inclination*. Its role is to make a general comparison between the up and down parts of a given *A* = ( *f <sup>A</sup>*, *gA*). Below let us refer to the so-called mean inclination:

**Definition 4.4** The **mean inclination** of an OFN *A* = ( *f <sup>A</sup>*, *gA*) is defined as the function *im A* : [0, <sup>1</sup>] → <sup>R</sup>:

$$i\_{mA} = (f\_A + \mathbf{g}\_A)/2\tag{4.3}$$

Let us note that the mean inclination of OFNs with symmetrical shapes is a constant function. It does not depend on direction, in particular, there is *im A* = *im A*<sup>|</sup> − . Inclination can be used, for example, in a defuzzification process. For more detailed investigation related to defuzzification methods in the OFN model, refer to [2, 10] and some further chapters in this book. Below we recall just one example.

**Definition 4.5** Let OFN *A* = ( *f <sup>A</sup>*, *gA*) be given. The result of the **center of mean inclination** defuzzification is the real number *xA* calculated as follows.

$$
\mathbf{x}\_A = (\mathbf{x}\_{\min} + \mathbf{x}\_{\max})/2\tag{4.4}
$$

where

$$\mathbf{x}\_{min} = \min \{ i\_{mA}(\boldsymbol{\alpha}) : \boldsymbol{\alpha} \in [0, 1] \} \qquad \mathbf{x}\_{max} = \max \{ i\_{mA}(\boldsymbol{\alpha}) : \boldsymbol{\alpha} \in [0, 1] \} \qquad (4.5)$$

#### **4.3 Basic Notions for OFNs**

There is a huge variety of pairs ( *f <sup>A</sup>*, *gA*), wherein only a part of them is going to correspond to standard fuzzy numbers, whereas the others may require deeper interpretation. From the point of view of arithmetic operations, those other numbers – called *improper* OFNs (see Sect. 4.4) – can be treated as abstract objects aimed at transforming standard inputs into standard outputs. Thus, it is important to understand the general characteristics of both proper and improper OFNs.

#### *4.3.1 Standard Representation of OFNs*

One of the most basic special cases refers to OFNs *A* = ( *f <sup>A</sup>*, *gA*) with monotonic functions. If *f <sup>A</sup>* and *gA* are both monotonic, then intervals *U PA* and *DOWNA* retain the following dependencies.

$$UP\_A = \left[ \min\{ \mathbf{s}\_A, \mathbf{l}\_A^- \}, \max\{ \mathbf{s}\_A, \mathbf{l}\_A^- \} \right] \quad DOWN\_A = \left[ \min\{ \mathbf{l}\_A^+, e\_A \}, \max\{ \mathbf{l}\_A^+, e\_A \} \right] \tag{4.6}$$

Furthermore, for monotonic *f <sup>A</sup>* and *gA*, it is possible to determine their inverse functions from <sup>R</sup> to [0, <sup>1</sup>]. Inverse functions are defined in a nontrivial way within the corresponding intervals *U PA* and *DOWNA*. To obtain a kind of continuous shape, we connect them with a plot of a constant function equal to 1 over interval *CONSTA* = [min{1<sup>−</sup> *<sup>A</sup>*, 1<sup>+</sup> *<sup>A</sup>*}, max{1<sup>−</sup> *<sup>A</sup>*, 1<sup>+</sup> *<sup>A</sup>*}] (Fig. 4.3). Thus we have three functions that can be used to represent monotonic pairs ( *f <sup>A</sup>*, *gA*) in a form more comparable to standard convex fuzzy numbers recalled in Chap. 1.

This form (or a view) is called a *standard representation*. The three considered functions η*U P <sup>A</sup>* , η*CON ST <sup>A</sup>* , η*DOWN <sup>A</sup>* are defined as follows, for *<sup>x</sup>* <sup>∈</sup> <sup>R</sup>:

$$\begin{aligned} \eta\_A^{UP}(\mathbf{x}) &= \begin{cases} f\_A^{-1}(\mathbf{x}) \text{ for } \mathbf{x} \in UP\_A\\ 0 & \text{otherwise} \end{cases} \\ \eta\_A^{CONST}(\mathbf{x}) &= \begin{cases} 1 \text{ for } \mathbf{x} \in CONST\_A\\ 0 \text{ otherwise} \end{cases} \\ \eta\_A^{DOWN}(\mathbf{x}) &= \begin{cases} g\_A^{-1}(\mathbf{x}) \text{ for } \mathbf{x} \in DOWN\_A\\ 0 & \text{otherwise} \end{cases} \end{aligned} \tag{4.7}$$

**Fig. 4.3** OFN presented in the standard form corresponding to convex fuzzy numbers

The above functions can be called the *up part*, the *constant part*, and the *down part*. A fuzzy number represented in such a way can be interpreted analogously to the standard model of convex fuzzy numbers, as outlined in Chap. 1. Properties of the *U PA* and *DOWNA* intervals (equalities 4.6) can be rewritten as

$$\eta\_A^{UP}(\mathbf{s}\_A) = 0 \qquad \eta\_A^{UP}(\mathbf{1}\_A^-) = 1 \qquad \eta\_A^{DOWN}(\mathbf{1}\_A^+) = 1 \qquad \eta\_A^{DOWN}(e\_A) = 0 \quad (4.8)$$

Similar transformation might also be possible for nonmonotonic up/down parts, although in such a case we would need to proceed with inversion of curves rather than functions. This would surely lead us towards the already-mentioned improper OFN objects. We also need to remember that even pairs of monotonic functions can correspond to improper OFNs. For example, if *f <sup>A</sup>* and *gA* are both increasing or both decreasing, then the above-considered three-component representation of *A* is still straightforward although it does not correspond to a standard fuzzy number.

#### *4.3.2 OFN Support*

Let us extend the concept of support – one of the most fundamental fuzzy set notions – onto the realm of OFNs. The extension is presented for both a general case and for OFNs *A* = ( *f <sup>A</sup>*, *gA*) with monotonic functions *f <sup>A</sup>* and *gA*. This way, just as before, the monotonicity of components is used as an illustrative special case, for which it is easier to interpret basic concepts inherited from fuzzy set theory.

A support is an important parameter in analyzing and modeling convex fuzzy numbers. In many practical situations, calculations involving fuzzy numbers are actually focused on their ranges of maximum membership and nonzero membership, which correspond to their supports. It is therefore also useful to introduce this notion for the OFN model. The following definition extends the classical case:

**Definition 4.6** For OFN *A* = ( *f <sup>A</sup>*, *gA*), the **support** *suppA* is an interval calculated as follows.

$$supp\_A = \{ f\_A(\alpha) : \alpha \in (0, 1] \} \cup CONST\_A \cup \{ g\_A(\alpha) : \alpha \in (0, 1] \} \tag{4.9}$$

Let us note that *suppA* is almost equal to the set-theoretic sum of intervals *U PA*, *CONSTA*, and *DOWNA*. The only difference is that – depending on the shapes of functions *f <sup>A</sup>* and *gA* – we sometimes need to subtract elements *sA* and/or *eA*.

Going further, if we consider OFNs with monotonic up and down parts, the support can be equivalently introduced by a simpler formula. Namely, we can use the bounds of particular intervals *U PA*, *CONSTA*, *DOWNA* of an OFN *A* = ( *f <sup>A</sup>*, *gA*) to determine its support *suppA*:

$$\begin{aligned} \operatorname{supp}\_A &= \begin{cases} (\mathbf{x}\_1, \mathbf{x}\_2) \text{ for } \mathbf{x}\_1 \notin CONST\_A \text{ and } \mathbf{x}\_2 \notin CONST\_A\\ [\mathbf{x}\_1, \mathbf{x}\_2) \text{ for } \mathbf{x}\_1 \in CONST\_A \text{ and } \mathbf{x}\_2 \notin CONST\_A\\ (\mathbf{x}\_1, \mathbf{x}\_2) \text{ for } \mathbf{x}\_1 \notin CONST\_A \text{ and } \mathbf{x}\_2 \in CONST\_A\\ [\mathbf{x}\_1, \mathbf{x}\_2] \text{ for } \mathbf{x}\_1 \in CONST\_A \text{ and } \mathbf{x}\_2 \in CONST\_A \end{cases} \end{aligned} \tag{4.10}$$

where

$$\mathbf{x}\_1 = \min\{\mathbf{s}\_A, \mathbf{e}\_A, \mathbf{l}\_A^-, \mathbf{l}\_A^+\} \qquad \mathbf{x}\_2 = \max\{\mathbf{s}\_A, \mathbf{e}\_A, \mathbf{l}\_A^-, \mathbf{l}\_A^+\} \tag{4.11}$$

Certainly this is just one of the possibilities to generalize the standard notion of a support onto the case of OFNs. Depending on interpretation, one might also think about defining *suppA* as an ordered interval [8] or as an interval (ordered or nonordered) taking into account only the quantities of *sA* and *eA*. Nevertheless, any reformulation of support should be equivalent to standard support whenever an OFN can be interpreted as a standard convex fuzzy number.

#### *4.3.3 OFN Membership Function*

Let us attempt to redefine the notion of a fuzzy membership function for OFNs in general. The following way of doing it is, as in the case of support, one of many possibilities. In principle, we propose that a fuzzy membership of a number *<sup>x</sup>* <sup>∈</sup> <sup>R</sup> in an OFN *A* = ( *f <sup>A</sup>*, *gA*) should be the highest context α ∈ [0, 1], in which *x* occurs, that is, such that *f <sup>A</sup>*(α) = *x* or *gA*(α) = *x*.

**Definition 4.7** A **membership function** of OFN *A* = ( *f <sup>A</sup>*, *gA*), denoted by μ*<sup>A</sup>* : <sup>R</sup> → [0, <sup>1</sup>], is defined for *<sup>x</sup>* <sup>∈</sup> <sup>R</sup> as

$$\mu\_A(\mathbf{x}) = \begin{cases} 1 & \text{for } \mathbf{x} \in CONST\_A \\ 0 & \text{for } \mathbf{x} \notin supp\_A \\ \max\{\alpha \in [0, 1] : f\_A(\alpha) = \mathbf{x} \vee g\_A(\alpha) = \mathbf{x}\} \text{ otherwise} \end{cases} \tag{4.12}$$

If the up and down parts correspond to monotonic functions, then we can redefine the membership function of an OFN as below:

$$\mu\_A(\mathbf{x}) = \begin{cases} 1 & \text{for } \mathbf{x} \in [\min\{\mathbf{l}\_A^-, \mathbf{l}\_A^+\}, \max\{\mathbf{l}\_A^-, \mathbf{l}\_A^+\}]\\ 0 & \text{for } \mathbf{x} \notin supp\_A\\ \max\{f\_A^{-1}(\mathbf{x}), g\_A^{-1}(\mathbf{x})\} \text{ otherwise} \end{cases} \tag{4.13}$$

The above form remains consistent with Definition 4.7, however, it starts resembling standard membership functions. If *f <sup>A</sup>* and *gA* have disjoint images, then max{ *<sup>f</sup>* <sup>−</sup><sup>1</sup> *<sup>A</sup>* (*x*), *g*−<sup>1</sup> *<sup>A</sup>* (*x*)} can be replaced by *<sup>f</sup>* <sup>−</sup><sup>1</sup> *<sup>A</sup>* (*x*) and *g*−<sup>1</sup> *<sup>A</sup>* (*x*) within intervals *U PA* \ [1<sup>−</sup> *<sup>A</sup>*, 1<sup>+</sup> *<sup>A</sup>*] and *DOWNA* \ [1<sup>−</sup> *<sup>A</sup>*, 1<sup>+</sup> *<sup>A</sup>*], respectively. Moreover, if the up part is increasing, the down part is decreasing, and *f <sup>A</sup>* ≤ *gA*, then a formula in Definition 4.7 becomes the exact representation of a standard fuzzy number's shape.

The formula in Definition 4.7 possesses very interesting characteristics also for improper OFNs *A* = ( *f <sup>A</sup>*, *gA*), regardless of whether their corresponding functions *f <sup>A</sup>* and *gA* are monotonic. Namely, for an arbitrary OFN, its membership function can be decomposed onto three fragments: strictly increasing, constant, and strictly decreasing. Some of those fragments may not correspond to continuous functions but the resulting membership function remains piecewise continuous as expected for standard fuzzy numbers. The mechanism introduced in Definition 4.7 is sometimes referred to as the so-called *MAX-choice* principle (see Sect. 4.4).

Thanks to the above observation, OFN membership functions can be employed in practice similarly to those of convex fuzzy numbers. As elaborated in Chap. 2, fuzzy memberships play the role of important numeric counterparts of linguistic rules in control systems. On the other hand, in further chapters we show that sometimes it is worth mixing classical approaches to constructing fuzzy controllers with those based on fuzzy arithmetics. From this perspective, generalizations of fuzzy membership functions for the OFN model can be especially helpful.

#### *4.3.4 Real Numbers as OFN Singletons*

In the case of convex fuzzy numbers, a real number *<sup>x</sup>* <sup>∈</sup> <sup>R</sup> is represented by the characteristic function χ*<sup>x</sup>* , which equals 1 for *x* and 0 otherwise. In the OFN model, representing real numbers is easy and intuitive as well.

**Definition 4.8** A real number *<sup>x</sup>* <sup>∈</sup> <sup>R</sup> is represented in terms of OFNs by a pair **x** = ( *f***x**, *g***x**), where *f***<sup>x</sup>** and *g***<sup>x</sup>** are defined as the function constantly equal to *x*:

$$f\_{\mathbf{x}} = \mathbf{g}\_{\mathbf{x}} = \mathbf{x} \tag{4.14}$$

Thus, an OFN representing real number *x* forms a unit at the level *x*. After transforming it to a standard view it is a vertical segment. It also coincides with the meaning of singleton in the case of standard fuzzy numbers. Therefore, the name *singleton* is used for real numbers represented in the OFN model as well.

The support of a singleton according to Definition 4.6 is the interval [*x*, *x*], that is, a single point *x*. Such a singleton always has *strict* neutral direction (see Definition 4.3). This is because the whole OFN is covered by both its parts, up and down.

#### **4.4 Improper OFNs**

The OFN model suggests looking at imprecision from a new perspective. The key aspect is related to the notion of direction. It can be interpreted in a practical way. Some examples of interpretations of that new aspect can be found in Sect. 4.6. OFNs

**Fig. 4.4** Examples of improper OFNs

are considered there as results of observations in time. Indeed, the time can be a natural (although not the only) interpretation of direction.

The consequence of the new approach to modeling imprecise numbers is a kind of inconsistency with standard fuzzy numbers. Namely, there are OFNs, which do not have a membership function in the sense of a convex fuzzy set. We have already mentioned such improper OFNs several times. A subspace of improper OFNs can be characterized in many ways. Let us formalize them as

**Definition 4.9** We say that *A* = ( *f <sup>A</sup>*, *gA*) is an **improper** OFN, if:


In general, when one of the parts of an OFN is neither monotonic nor constant, then such an OFN is improper. However, as already mentioned, there exist also improper OFNs with monotonic parts. For some examples, let us refer to Fig. 4.4. Let us note that, as earlier, we use arrows to express graphically OFNs' direction.

Improper OFNs cannot be represented as convex fuzzy sets. Still, it does not mean that they are of no use. When we interpret the direction as time of a measurement, then even improper OFNs turn out to represent important information about the observed processes (see Sect. 4.6.3). Moreover, it may turn out that during a chain of arithmetic calculations some intermediate results are improper, even though both inputs and outputs are interpretable as standard fuzzy numbers. In such cases, it would be quite unreasonable to abandon the whole computational process because, after all, the most important aspect is the interpretation of the final results.

If for a given scenario interpretation of an improper OFN is important, we can – depending on practical needs – utilize one of the available defuzzification mechanisms (e.g., the one outlined at the end of Sect. 4.2) or proceed with fuzzy membership derivation described in Definition 4.7. As mentioned before, we can refer to that

<sup>1</sup>For simplicity, in this chapter we do not distinguish between the cases of increasing/decreasing and nondecreasing/nonincreasing functions. In this definition, we refer to that second case.

<sup>2</sup>By overlapping of intervals, for example, *U PA* and *DOWNA*, we mean that there are elements *<sup>x</sup>*, *<sup>y</sup>*,*<sup>z</sup>* <sup>∈</sup> <sup>R</sup>, *<sup>x</sup>* <sup>&</sup>lt; *<sup>y</sup>* <sup>&</sup>lt; *<sup>z</sup>*, such that *<sup>x</sup>*,*<sup>z</sup>* <sup>∈</sup> *U PA* and *<sup>y</sup>* <sup>∈</sup> *DOWNA*, or *<sup>x</sup>*,*<sup>z</sup>* <sup>∈</sup> *DOWNA* and *<sup>y</sup>* <sup>∈</sup> *U PA*.

**Fig. 4.5** (a) Improper OFNs. (b) The same OFNs interpreted using the MAX-choice principle

derivation as the MAX-choice principle. This is because, for each given argument, it labels it with the maximal element out of all relevant values.

Figure 4.5 presents an effect of applying the MAX-choice principle for three examples of improper OFNs. Such a solution enables us to build a convex fuzzy set interpretation of an arbitrary OFN. The obtained sets are normal. This fulfills demands of standard scenarios of applying fuzzy numbers. Moreover, proper outputs of the considered procedure can still be interpreted as OFNs, if necessary. However, let us emphasize that the MAX-choice should be used only if transformation of an improper OFN to the proper one is truly needed. In particular, if there are any further calculations planned over a given improper OFN, then its transformation would mean losing information that might be potentially important later.

#### **4.5 Basic Operations on OFNs**

This section presents examples of calculations on OFNs. Their main idea is to operate separately on the up and down parts. Such an approach allows us to conduct computations on OFNs directly on the universe of real numbers. It follows from the fact that we are now working with functions from [0, <sup>1</sup>] to <sup>R</sup>.

#### *4.5.1 Addition and Subtraction*

**Definition 4.10** Let OFNs *A* = ( *f <sup>A</sup>*, *gA*), *B* = ( *fB*, *gB*), and*C* = ( *fC*, *gC*) be given. We can say that:

• *C* is the sum of *A* and *B*, denoted *C* = *A* + *B*, if for every α ∈ [0, 1] there is:

$$f\_A(\alpha) + f\_B(\alpha) = f\_C(\alpha) \qquad g\_A(\alpha) + g\_B(\alpha) = g\_C(\alpha) \tag{4.15}$$

• *C* is the result of subtracting *B* from *A*, denoted *C* = *A* − *B*, if there is:

$$f\_A(\alpha) - f\_B(\alpha) = f\_C(\alpha) \qquad g\_A(\alpha) - g\_B(\alpha) = g\_C(\alpha) \tag{4.16}$$

Adding numbers *A* and *B* of the same direction (see Definition 4.3), which are described by linear up/down functions, allows us to obtain the same results as in the case of operations on standard fuzzy numbers [4]. Figure 4.6 illustrates adding two OFNs and transforming the obtained result to the standard form.

More examples are presented in Figs. 4.7 and 4.8. Figure 4.8 shows a result that is an improper OFN. Let us also note that, as we show later, the results of adding OFNs with opposite directions do not need to be improper.

Figures 4.9 and 4.10 illustrate some examples of subtraction. In Fig. 4.10, again, we get an improper OFN as a result.

**Fig. 4.6** A general mechanism of adding two OFNs

**Fig. 4.7** Adding two OFNs with negative direction

**Fig. 4.8** Improper OFN as a result of adding OFNs

**Fig. 4.9** A proper result of subtraction of OFNs

**Fig. 4.10** An improper result of subtraction of OFNs

As discussed before, subtracting *A* should be the same as adding a number −*A* that is opposite to *A*. The ability of expressing −*A* for each *A* is, in our opinion, one of the biggest advantages of the OFN model, from the perspectives of both finer mathematical properties and managing imprecision during arithmetic calculations in practice. Let us recall that such a number can be introduced as −*A* = ( *f*−*<sup>A</sup>*, *g*−*<sup>A</sup>*), defined as follows.

$$f\_{-A} = -f\_A \qquad \text{g}\_{-A} = -\text{g}\_A \tag{4.17}$$

In particular, if *B* = *A*, then the number −*A* is added to *A*. Then, for every α ∈ [0, 1], we obtain *fC*(α) = *f <sup>A</sup>*(α) − *f <sup>A</sup>*(α) = 0 and *gC*(α) = *gA*(α) − *gA*(α) = 0. Therefore, the result of operation of the form *A* − *A* is the singleton representing 0, that is, the pair **0** = ( *f***0**, *g***0**) defined using formula (4.14) for *x* = 0 (see Fig. 4.11).

**Fig. 4.11** Singleton zero as a result of an OFN operation

In general, when considering different examples of operations on OFNs, we may obtain results that have no clear interpretation in a standard framework. However, whenever required, the previously discussed MAX-choice principle can be utilized to derive such an interpretation. Moreover, improper OFNs – such as those visible in Figs. 4.8 and 4.10 – still contain significant information and they can serve as inputs to further operations that might ultimately result in proper OFNs.

Finally, we are now able to work with direction, an additional component of specification that illustrates a position of the OFN's up part in relation to its down part. It is totally up to us whether that new component is used only as a purely mathematical property or it corresponds to a nontrivial real-world context.

#### *4.5.2 Multiplication and Division*

**Definition 4.11** Let three OFNs *A* = ( *f <sup>A</sup>*, *gA*), *B* = ( *fB*, *gB*), and *C* = ( *fC*, *gC*) be given. We can say that:

• *C* is the result of multiplication of *A* and *B*, denoted *C* = *A* · *B*, if for every α ∈ [0, 1] there is:

$$f\_A(\alpha) \cdot f\_B(\alpha) = f\_C(\alpha) \qquad g\_A(\alpha) \cdot g\_B(\alpha) = g\_C(\alpha) \tag{4.18}$$

• *C* is the result of *A* divided by *B*, denoted *C* = *A*/*B*, if there is:

$$f\_A(\alpha) / f\_B(\alpha) = f\_C(\alpha) \qquad \text{g}\_A(\alpha) / \text{g}\_B(\alpha) = \text{g}\_C(\alpha) \tag{4.19}$$

Multiplication of two OFNs is shown in Fig. 4.12. Certainly, division *A*/*B* can be formulated only under the constraint that *B* does not contain 0; that is, for every α ∈ [0, 1] we have *fB*(α) = 0 and *gB*(α) = 0.

As in the case of addition and subtraction operations, division should be expressible as multiplication by an inverse number. For a given *A* = ( *f <sup>A</sup>*, *gA*), its inverse

**Fig. 4.12** Examples of multiplication of OFNs

**Fig. 4.14** Multiplication of *A* by *B*−<sup>1</sup>

*A*−<sup>1</sup> = ( *f <sup>A</sup>*−<sup>1</sup> , *gA*−<sup>1</sup> ) is defined as follows.

$$f\_{A^{-1}} = 1/f\_A \qquad \mathbf{g}\_{A^{-1}} = 1/\mathbf{g}\_A \tag{4.20}$$

The division procedure is shown in Figs. 4.13 and 4.14. First, we determine an inverse number for *B*. As we can see, inverse numbers have opposite directions. Next, the inversion of *B* is multiplied by *A* and we obtain a result of dividing *A* by *B*.

Although a real (precise) zero represented by the pair **0** = ( *f***0**, *g***0**) is a neutral element for addition, the neutral element for multiplication is the pair **1** = ( *f***1**, *g***1**). An important property of the model presented in this chapter is the fact that multiplying any OFN by its inverse number allows us to obtain exactly the neutral element for multiplication as a result.

This makes it possible to analyze OFNs from a more formal mathematical perspective, analogously to some previous works on fuzzy number extensions [6]. Let us notice that the space of OFNs is isomorphic to a linear space of real two-dimensional vector-valued functions defined on the closed interval [0, 1], with a norm specified as

$$||A|| = \max\_{\alpha \in [0, 1]} (\sup\_{a \in [0, 1]} |f\_A(\alpha)|, \sup\_{\alpha \in [0, 1]} |g\_A(\alpha)|) \tag{4.21}$$

It is topologically a Banach space. The neutral element of addition is **0**. We also have a Banach algebra with the unity **1** [19]. Hence, although in this chapter we focus on more basic operations, further studies on advanced mathematical characteristics of OFNs are surely possible.

#### *4.5.3 General Model of Operations*

The most natural and intuitive way to introduce a general pattern of calculations on OFNs is to define them pairwise on their up and down parts. Let us formulate such a pattern below. It represents all previous operations in a short form.

**Definition 4.12** Let OFNs *A* = ( *f <sup>A</sup>*, *gA*), *B* = ( *fB*, *gB*), and*C* = ( *fC*, *gC*) be given. The sum *C* = *A* + *B*, subtraction *C* = *A* − *B*, product *C* = *A* · *B*, and division *C* = *A*/*B* are defined by the following formula holding for every α ∈ [0, 1].

$$f\_C(\alpha) = f\_A(\alpha) \star f\_B(\alpha) \qquad g\_C(\alpha) = g\_A(\alpha) \star g\_B(\alpha) \tag{4.22}$$

where replaces operations +, −, ·, and /. Moreover, *A*/*B* is determined only if *B* = ( *fB*, *gB*) does not contain zero values.

In fact, can represent any transformation of two OFNs under specific constraints. Such transformations have already been discussed and analyzed, including various examples in [9, 14]. Let us consider two further examples:

**Definition 4.13** Let *A* = ( *f <sup>A</sup>*, *gA*), *B* = ( *fB*, *gB*), and*C* = ( *fC*, *gC*) be three OFNs. We can say that:

• *C* is the result of exponentiation of *A* raised to the power of *B*, denoted *C* = *A<sup>B</sup>*, if for every α ∈ [0, 1] there is:

$$f\_C(\alpha) = f\_A(\alpha)^{f\_B(\alpha)} \qquad \text{g}\_C(\alpha) = \text{g}\_A(\alpha)^{\text{gg}(\alpha)} \tag{4.23}$$

• *C* is the result of the logarithm of *A* with respect to base *B*, denoted *C* = log*B*(*A*), if for every α ∈ [0, 1] there is:

$$f\_{\mathcal{C}}(\alpha) = \log\_{f\_{\mathcal{B}}(\alpha)}(f\_A(\alpha)) \qquad \text{g}\_{\mathcal{C}}(\alpha) = \log\_{\mathcal{g}\_{\mathcal{B}}(\alpha)}(\mathcal{g}\_A(\alpha)) \tag{4.24}$$

Of course, as in the case of adequate operations for real numbers, the same restrictions should be applied with OFNs. During exponentiation, when the exponent is not an integer, the main limitation is exclusion as a base of those OFNs that contain negative values. In the case of logarithms, OFNs can contain only nonnegative values and, in addition, the base of the logarithm cannot include 1.

In summary, the OFN model grants flexibility of a wide range of calculations on imprecise data in a similar way as in the case of real numbers representing crisp data. It retains fuzzy quantitative characteristics, but without the necessity to grow imprecision. While using the OFN model, one should certainly remember that its foundations are slightly different from the case of Zadeh's fuzzy sets. In particular, improper OFNs can appear. However, despite their unusual shapes, improper OFNs can still contain important information needed for calculations. In particular, in examples related to data processing in Sect. 4.6.3, such objects are an important part of the analysis of information available in practice.

The above flexibility can be important for applications, where users expect a support for multiple types of operations. For example, in relational database systems, SQL statements need to include a number of arithmetic expressions. In the literature, one can find interesting examples of fuzzy-like histograms summarizing data contents that are employed to optimize database performance [20]. There are also database implementations aimed at acceleration of arithmetic calculations by means of interval ranges of values occurring for particular columns in particular data clusters [24]. Such solutions could be reconsidered by extending the currently utilized interval and trapezoidal summary structures with a concept of OFN-related direction. Namely, direction could be used to express a trend of values observed on data rows consecutively loaded into a database.

#### *4.5.4 Solving Equations*

This subsection shows how easy and flexible the calculations with OFNs can be. For standard fuzzy numbers, solving simple equations is often quite inaccurate. Surely, such solutions are expected if one follows the previously mentioned assumptions about accumulation of uncertainty during fuzzy arithmetic operations. However, one might also consider fuzzy equations for other purposes, for example, in order to set up some indirect embedded constraints for fuzzy variables. In such a case, it should also be possible to reverse a degree of uncertainty, that is, to obtain an equation's result that would be *less fuzzy* than the equation's coefficients.

Examples in this subsection refer to solving an equation *X* = *A* + *B*, where *A* and *B* are known fuzzy numbers. Attention should be paid to the following two possibilities: *B* having a greater support than *A* (Fig. 4.15), as well as *A* having a greater support than *B* (Fig. 4.16).

In the framework of standard fuzzy numbers, for the first of the above possibilities, there is a solution although it cannot be obtained by a simple arithmetic operation. However, as for the second possibility above, the solution does not exist because there is no such standard fuzzy number that could be added to *A* to obtain an outcome with a *narrower* support.

With use of the OFN model, both options are resolved in the same manner by simple calculation of *X* = *B* − *A*, which is presented by Figs. 4.17 and 4.18. In particular, in Fig. 4.18, we can observe that *X* has the opposite direction to *A*.

Thanks to the freedom of algebraic operations on OFNs, we can also relatively easily deal with equations involving fuzzy polynomials defined by analogy to polynomials over real numbers. By a fuzzy polynomial *P* we mean a function that transforms each given OFN *X* = ( *fX* , *gX* ) into OFN specified as follows.

$$P(X) = A\_n X^n + \dots + A\_1 X + A\_0 \tag{4.25}$$

where *X* is treated as a fuzzy *variable* and *A*0, *A*1,..., *An* are called *coefficients*.

**Fig. 4.15** Equation *A* + *X* = *B* with the right-hand side *B* being *wider* than its left-hand side component *A*

**Fig. 4.16** Equation *A* + *X* = *B* with the right-hand side *B* being *narrower* than its left-hand side component *A*

**Fig. 4.17** Solution of the equation illustrated by Fig. 4.15

Finally, it is worth emphasizing that this subsection is just a brief introduction to the problem of solving equations within the OFN model. For more detailed investigation we refer to Chap. 9, where OFN-based complex equations are considered for some applications in economy. More advanced examples related to utilization of OFNs in differential equations can be found in [11]. On the other hand, it is important to compare further the expressive power of the OFN model with other approaches with regard to fuzzy equation-solving methods [1].

**Fig. 4.18** Solution of the equation illustrated by Fig. 4.16

#### **4.6 Interpretations of OFNs**

The OFN model enables us to establish a quite efficient computational framework. It provides a new look at imprecision, however, it also has other consequences that need to be considered in applications. First of all, there is some inconsistency between OFNs and standard fuzzy numbers. This is understandable because OFNs are a larger class of objects. This aspect was commented on, for example, in [15, 21].

A potential for practical usage of OFNs also corresponds to their direction, an additional kind of information that is not represented by standard fuzzy numbers. This aspect turned out to be useful in many real-world scenarios, such as representing trends in control processes, expressing diversity of opinions in social networks, modeling dynamics of financial data, and simulating brain functions [3, 7, 18, 23].

Interpretation of objects represented by the OFN model was discussed and analyzed, for example, in [12, 22]. Here we present some revised aspects of that analysis. A common use of fuzzy sets is to represent the imprecise data, wherein fuzzy numbers are dedicated to imprecise quantitative data. The OFN model is primarily created for representing and processing fuzzy quantities as well. Let us remember it when drawing further intuitions related to applications.

#### *4.6.1 Direction as a Trend*

Interpretation of OFNs comprises adapting a general idea of standard fuzzy numbers, with an addition of direction. By using OFNs, we can describe trends of imprecise quantitative values observed in real-world processes. The up and down parts of OFNs can be related, for example, to the experts' opinions about dynamic changes of the analyzed values. In the following subsections, we refer to a couple of possible cases of direction interpretations.

When using OFNs, we have two options. We can utilize their direction just for arithmetic purposes, or we can assign them with more complex information. In Fig. 4.19, we can see OFN *A* = ( *f <sup>A</sup>*, *gA*), which represents a linguistic variable *slow*

**Fig. 4.19** Fuzzy number *about 20* with a growing trend

corresponding to the speed of a vehicle. Formally, *slow* is a fuzzy set rather than a fuzzy number. On the other hand, the domain of possible velocities is an interval of real numbers, thus in practice *slow* will usually be represented by a triangular (or trapezoidal) convex fuzzy number (or fuzzy interval). Now, let us use the linguistic term *about 20 km/h* instead of *slow*. By modeling it with the use of OFN *A* = ( *f <sup>A</sup>*, *gA*), we can interpret *A*'s direction to say that it is *about 20in the speed-up process*. Thus, *A*'s direction extends application options, without diminishing the importance of standard fuzzy number interpretation. After all, information of a form *about 20 km/h in the speed-up process* is an extension of *about 20 km/h*.

#### *4.6.2 Validity of Operations*

The analysis of a fuzzy arithmetic model should also include verification as to whether the results of calculations are consistent with real-world expectations.

According to the trend-based interpretation, let OFNs *A* and *B* visible in Fig. 4.20 represent opinions prepared by an expert about two units of a financial company: *A's income is at a level of 3 million, with an upward trend*, as well as *B's income is at a level of 6 million, with a downward trend*.

By using OFNs, the expert can actually describe not only a value and a trend but also an escalation of that trend. We have two OFNs with different *spreads* between their up and down components; indeed, object *A* is *wider* than *B*. By making the up part of *B* range from 7 to 6 million, the expert considers a potential of changes within 1 million. On the other hand, the up part of *A* ranges from 1 to 3, thus *A* could be recognized as a process that is more dynamic than in the case of *B*.

Yet another aspect is the considered OFNs' direction, which informs that *B* is a decreasing process and *A* is an increasing one.

In reality, we would expect here the total income at a level of 9 million. If we use the OFN model and add numbers *A* and *B* together, then we get the anticipated results. However, as we can see in Fig. 4.21, we also have additional information that seems to be consistent with our expectations as well. Namely, the obtained result

**Fig. 4.20** OFNs that describe an income for two units of a financial company

**Fig. 4.21** A result of adding both incomes

shows that the trend is growing. Indeed, an increasing process related to *A* is more dynamic than a decreasing process related to *B*. However, because of *B*, the overall increasing trend is less dynamic than for *A*.

The above example shows how interpretation of the OFNs' direction can correspond to intuitions behind real-world observations. Such correspondence is important not only from a viewpoint of mathematical properties but also becomes useful at an operational level. In general, we believe that it can open new opportunities in front of applications of fuzzy numbers. Part III of this book presents more ideas about utilization of OFNs and their direction components.

#### *4.6.3 The Meaning of Improper OFNs*

Figure 4.22 illustrates a situation that is somewhat alternative to the example of income analysis considered in Sect. 4.6.2. As before, *A* and *B* are incomes of units of a financial company. However, now their sum is an improper OFN.

In this particular example, objects *A* and *B* are not symmetrical. They model a change in the income process. *A* represents an increase, which is slowing down. *B* represents a decreasing income, which is going to drop down even more. Thus we can expect the future dynamics of a sum of both incomes to be directed towards a

**Fig. 4.22** Interpretation of improper OFN

decreasing trend. Even for *A* – which is still growing – the future expectations (down part) present less potential than the past (up part).

In summary, *C* represents a collapse of the upward trend of income for the whole company. This way, *C* contains information about a reversing trend. It shows that the idea of using OFNs to model changes of values is valid and intuitive.

Analogous analysis could also be conducted for other examples of potential usage of OFNs. As mentioned in Sect. 4.5.3, one of them could be related to operating with data summaries within a massive data-processing framework [20, 24]. In such a case, an improper OFN could mean that at the beginning of a data load process the values of a given column tend to increase to a certain most representative level, but later they begin to decrease again. In such a scenario, the trend-based interpretation of OFNs is related to a natural flow of data being loaded to a database system rather than the time of actual observation or measurement.

#### **4.7 Summary and Further Intuitions**

The main technical differences between the OFN model and standard fuzzy numbers refer to inverting and ordering local components of a fuzzy membership function. Such ordering has deep consequences for forming mathematical properties and implementing the model. It provides both (1) computational characteristics allowing us to define opposite and inverse OFNs (with respect to addition and multiplication, resp.), and (2) additional information, called direction, that is not present in previous approaches and that can be useful in practice.

Usually, one is focused on a result of actions rather than their inputs. Thus, while dealing with functions, one tends to concentrate on their output values. In the case of fuzzy membership functions, outputs take a form of elements of the interval [0, 1], interpreted as truth values or degrees of compatibility. As for fuzzy numbers, the primary goal should be to model real numbers. In the case of OFNs *A* = ( *f <sup>A</sup>*, *gA*), as well as an ordering representing their up parts and down parts, we indeed focus on the target real numbers induced by functions *<sup>f</sup> <sup>A</sup>*, *gA* : [0, <sup>1</sup>] → <sup>R</sup>.

The emphasis on degrees of truth is proper while working with qualitative approaches corresponding to fuzzy logic. However, for quantitative approaches, such as those referring to fuzzy numbers, processing with the elements of R seems to be a good idea. Hence, OFNs should be considered primarily as an alternative to methods based on standard fuzzy arithmetics, rather than fuzzy logic.

Surely, the outcomes of calculations obtained within the OFN model may in some situations be harder to interpret than in the case of far more popular convex fuzzy numbers. However, we hope that this chapter provided the readers with appropriate tools to let such an interpretation be sufficiently straightforward.

#### **References**


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Chapter 5 Processing Direction with Ordered Fuzzy Numbers**

**Piotr Prokopowicz**

**Abstract** It was already mentioned in previous sections that the Ordered Fuzzy Number (OFN) model can represent a kind of tendency or direction. However, for a real practical use of this feature the tools for processing it are also needed. Of course some kind of quantitative processing is provided by the definitions of calculations, but there is much more potential for this feature apart from arithmetic operations. This part presents the idea of a property of processing data called **sensitivity to the direction**. The main focus here is placed on the proposition of a direction determinant parameter that can be understood as a kind of measure of a direction. This determinant is a basis for the definition of such elements as the compatibility between two OFNs and also for an inference operator for a rule where the OFNs were used. The propositions of such operations are the important part of these sections of the book.

## **5.1 Introduction**

The Ordered Fuzzy Number (OFN) model introduces a new feature, the direction. It is the representation of order of the *up-part* and *down-part* of an OFN from Definition 4.1 in Chap. 4. It is used for defining those arithmetical calculations that do not have to produce more imprecise results. But there is another potential of this feature. In fact if we can use OFN to describe the situation, *"A vehicle speed is about 50 km/h and it is growing,"* it would be more efficient to have the potential to use it not only for calculations but also for more complex processing as, for example, in the rule, *"IF speed is 50 km/h and is growing, THEN safety of a city drive is 75% but it is lowering."* In general, it is similar to the idea of the gradual fuzzy system (see [8]), however, the source of the OFN concept is quite different. An interesting approach to trend modeling using the classical fuzzy numbers idea is also presented in [11], where the trend is understood as a gradual dependence between attributes. However,

P. Prokopowicz (B)

Institute of Mechanics and Applied Computer Science, Kazimierz Wielki University, Bydgoszcz, Poland e-mail: piotrekp@ukw.edu.pl

<sup>©</sup> The Author(s) 2017

P. Prokopowicz et al. (eds.), *Theory and Applications of Ordered Fuzzy Numbers*, Studies in Fuzziness and Soft Computing 356, DOI 10.1007/978-3-319-59614-3\_5

gradual fuzzy rules have a form, "*The more X is F*, *the more Y* is *G*," but here for the OFN model a more appropriate form is *IF X is in F which is growing/decreasing, THEN Y is in G which is growing/decreasing*. Moreover, the OFNs in a natural way represent a tendency unlike the classical fuzzy sets/numbers where modeling a trend requires additional actions.

It was already presented in the previous chapter (see Sect. 4.7) of this book that the reversing of the axes in the definition of OFNs compared to typical fuzzy conceptions reverses focus in the analysis of the problems. Functions that form an OFN have a target set that is a universe of real numbers. It seems proper if we want to model a quantitative problem. This reversal does not prevent the OFN model from being a tool for an imprecise data representation. Additionally, arithmetic operations are not the only form of processing the quantitative values. One of great advances of fuzzy set theory is easy and intuitive modeling of the linguistic formulas with the reference rules. If we want to retain this advantage also for the OFN model we need a basic tool for comparing two values that can be called a compatibility. For practical linguistic use the compatibility is a result of the sentence or statement type *A is B*, where *A* and *B* are imprecise values, the OFNs in this case.

Presenting the tools for the processing of OFNs other than direct calculations is the main goal of these sections of the book. The basic idea here is to preserve good intuitiveness of the general fuzzy approach and combine it with the tendency modeling potential of the OFN model. The methods presented in the next sections are *sensitive to the direction* (see [23, 25]).

*Remark 1* As the **sensitivity to the direction** we understand the property of operation. This property means that the result can be different if we change the direction of the OFNs used in the operation.

It should be noted that the above remark is a general postulate, not a formal definition of the property. The problem is quite complex, thus more explanation is needed. We especially postulate that the result changes if only one of the components (OFN) of the operation will change the direction (see Definition 4.2 the *reversal of direction* operation from Chap. 4). In many cases where two data items change a direction our intuition suggests the result should not be changed. For example, let us look at the linguistically described rules that consider tendency:


Both of them express the same intuition, yet with opposite tendency, thus the change of direction for both values *speed* and *saf ety* should not really change the result. In addition, when analyzing sensitivity to the direction in the OFN methods, it is necessary to consider their specificity such as the improper OFNs (see previous chapter Sect. 4.4). Thus, a method that is generally sensitive to the direction may give the same result despite change where the *up-part* and *down-part* of the given OFN are equal. Apart from many improper OFNs such a situation will also arise in the singleton case. Thus the lack of change in the result for some specific situations does not negate the method as one that is sensitive to the direction. Therefore when we postulate for a given method to be sensitive, the words "change of direction **can** (not must) change the result" are a clue.

It is worth noting that the basic arithmetic operations on the OFN model presented in Sect. 4.5 are generally sensitive to the direction. If the *up-part* and *down-part* of OFN *A* are not equal, then the *reversal of direction* operation (see Definition 4.2 from previous chapter) generates *A*| − -= *A*. Therefore the result of an arithmetic operation will be different after reversal of the single input value.

The purpose of this chapter is to propose a full set of methods and operations to define fuzzy systems based on OFNs that are sensitive to the direction feature. Therefore in the next sections, a general tool for processing a tendency of OFNs is presented. It is called the **direction determinant** (see also [24, 25]) as it is a kind of measure of direction for a given element of OFN support. Next the compatibility of OFNs as a result of statement *A is B* is proposed see [25] that uses the direction determinant. Finally a proposal of a technical inference method is presented that is meant to be a practical realization of the rule *IF X is A THEN Y is B*.

#### **5.2 Direction Measurement Tool**

The key element of the OFN model is the order between the *up-part* and *down-part*, which is independent of the real numbers. This can also be called the direction or orientation. It is taken into account in the definitions of arithmetic operations and their extensions, which make the calculations flexible and unified and more importantly, their properties and relationships are consistent with calculations on real numbers (see previous part of this book as well as [22]). Thus it seems natural that information processing methods based on OFNs also take into account the direction. Here the tool that allows meeting this assumption in defining methods is presented. However, it is helpful to start with a supporting structure that simplifies further description.

In general, the propositions presented in this section refer to the concept of the membership function for the OFN model presented in Sect. 4.3.3.

#### *5.2.1 The PART Function*

The *PART* function as the result presents information about the part of the OFN that contains the given argument [24].

**Definition 1** For the OFN *A* defined on *X* the PART function *X* → *Y* is determined as follows.

$$PART\_A(\mathbf{x}) = \mathbf{y} = \begin{cases} CONST\_A : \mathbf{x} \in CONST\_A, \\ UP\_A : \mathbf{x} \in UP\_A, \\ DOWN\_A : \mathbf{x} \in DOWN\_A, \\ NONE\_A : \mathbf{x} \in NONE\_A. \end{cases} \tag{5.1}$$

where:

*x* ∈ *X*,

*Y* = {*CONST <sup>A</sup>*, *UPA*, *DOWNA*,*NONEA*},

*CONST <sup>A</sup>* – A subset of *X* for which the membership function of *A* number is equal to 1.

*UPA* – A subset of *X* for which the inverse of the up-part has values.

*DOWNA* – A subset of *X* for which the inverse of the down-part has values.

*NONEA* – A subset of *X* for which the membership function of *A* number is 0.

Figure 5.1 illustrates the effect of the *PART* function. Example results presented there are as follows.

$$\begin{aligned} PART(\mathbf{x}\_1) &= DOWN\\ \hline PART(\mathbf{x}\_2) &= UP \\ PART(\mathbf{x}\_3) &= CONST \\ \hline PART(\mathbf{x}\_4) &= UP \\ \hline MART(\mathbf{x}\_5) &= NONE \end{aligned} \tag{5.2}$$

Fuzzy numbers are fuzzy sets defined over the space (or subspace) of real numbers. Thus the sets *U P*, *CONST* , and *DOWN* can be treated as numerical intervals (see also Sect. 4.2 from previous chapter). We use the following denotations of their boundaries.

$$\begin{aligned}UP &= (\text{s}, 1^-) \\ CONST &= [1^-, 1^+] \\ DOWN &= (1^+, e) \end{aligned} \tag{5.3}$$

#### *5.2.2 The Direction Determinant*

The direction of the OFN is an additional property in comparison with classical fuzzy numbers and its meaning is different from the degree of membership. Therefore, if we want to process the full information contained in the OFN, we need an additional parameter that will represent a new property.

The proposition is **direction determinant** (see [23–25]). The purpose of this parameter is to represent a kind of direction "intensity" of the argument. The direction determinant is strictly connected with a particular OFN and is defined only for its support (see Sect. 4.3.2). The general idea is to measure a distance of argument from the core of the OFN. It is calculated from the ratio of the position in support of the considered argument in relation to the whole fuzzy boundary of the OFN, to which this argument belongs. It is well illustrated in Fig. 5.2.

Such an approach is connected with one of the useful interpretations of the OFN direction [13, 14]. The intuition behind the **direction determinant** is that the partial membership at the fuzzy boundaries can represent the imprecise concept of "now". If we treat this imprecision as symmetrical, then our fuzzy "now" in the context includes as much time forwards as backwards. Hence, *U P* and *DOWN* in the scale of time (independently of the arguments) are equal. Thus there is a reason for calculating the determinant of the element situated on *U P* or *DOWN* to the proportion of the respective intervals and not only to the value.

**Definition 2** Let *A* denote the OFN, and *x* be an element of the support. **The proportional direction determinant** of *x* in relation to *A* marked *dir <sup>A</sup> <sup>x</sup>* is calculated as a result of directional function *D* : *suppA* → (−1; 1) for the argument *x* in the following way.

$$\operatorname{dir}\_{\mathbf{x}}^{A} = D\_{A}(\mathbf{x}) = \begin{cases} 0 & \text{: for PART(x) = CONST} \\ \frac{(\mathbf{x} - \mathbf{1}^{-})}{(\mathbf{1}^{-} - \mathbf{s})} \text{: for PART(x) = UP} \\ \frac{(\mathbf{x} - \mathbf{1}^{+})}{(\mathbf{s} - \mathbf{1}^{+})} \text{: for PART(x) = DOWN} \end{cases} \tag{5.4}$$

The above-mentioned determinant is called proportional because this is a certain simplification/approximation of the general idea. This facilitates practical implementation and still serves its purpose.

It is worth noting that, if the degree of membership is equal to zero, the direction determinant is undefined, because the argument is not part of function domain *D* (the value is outside OFN support). It should also be noted that for the arguments in the *CONST* interval, we have the direction determinant that is equal to zero, which is justified, as these are the values about which we have no doubt: their membership is full (equal to 1). According to this intuition we should also expect (and this is taken into account) that, the closer the arguments are to the kernel of the fuzzy number, their direction "intensity" (i.e., the direction determinant) is smaller. We should also note that the sign of the determinant clearly shows its membership to a selected part. If it is negative, it means that the argument belongs to *U P*, and if it is positive, then the argument is part of *DOWN*. Let's call this the **sign dependency**. Thus in certain situations we can simplify the analysis. When processing the data represented by the OFNs we wish to include only the information about which part we deal with (*up* − *part* or *do*w*n* − *part*); the information about the sign of the determinant is sufficient without considering the exact value.

Based on the above analysis, the trivial variant of direction determinant can be proposed.

**Definition 3** Let *A* denote the OFN, and *x* be an element of the support. **The trivial direction determinant** in relation to number *A* for *x* marked as *dirx* is calculated with the use of the value of the directional function *DA* : *suppA* → (−1; 1) for the argument *x* in the following way.

$$dir\_{\mathbf{x}}^{A} = D\_{A}(\mathbf{x}) = \begin{cases} 0 & \text{: for PAR(x) = CONST} \\ -1 & \text{: for PAR(x) = UP} \\ 1 & \text{: for ART(x) = DOWN} \end{cases} \tag{5.5}$$

As can be noted, the trivial direction determinant simply remaps a set (*U P*,*CONST* , *DOWN*) into the set (−1, 0, 1).

Having a basic tool, we can now propose the methods that are sensitive to the direction.

#### **5.3 Compatibility Between OFNs**

The fuzzy expression (or statement) "*A is B*" where *A* and *B* are fuzzy sets is a basis for the analysis where we want to apply the fuzzy sets and their imprecise mechanisms. The calculation result of this statement can be called a similarity or compatibility of *A* with *B*. The idea of compatibility and similarity between fuzzy sets was discussed in many publications (e.g., [5, 6, 12, 27]).

In this section the idea for calculating compatibility between two OFNs is presented [25]. We search methods sensitive to the direction, therefore a solution is to use the direction determinant in processing. Thus, as the result of fuzzy statement *A is B* a pair of values is proposed. First is a truth value in classical fuzzy meaning: the value from interval [0, 1], which indicates a degree of compatibility between two pieces of imprecise data represented by the OFNs. The second is the direction determinant, which retains information about direction.

**Definition 4** For Ordered Fuzzy Numbers *A* and *B* the result of expression "*A* is *B*" called **directed fuzzy compatibility** (DFC) and labeled *COMPAB* is composed of two values: the truth value *TAB* and direction determinant *DAB* calculated as follows.

**Fig. 5.3** The compatibility of a singleton with a general OFN

$$COMP\_{AB} = (T\_{AB}, D\_{AB}) \tag{5.6}$$

$$T\_{AB} = \max(\min(\mu\_A(\mathbf{x}), \mu\_B(\mathbf{x}))): \mathbf{x} \in \mathbf{X} \tag{5.7}$$

If *TAB* is zero, then *DAB* is unspecified, else

$$D\_{AB} = D\_B(\mathbf{x}\_0), \; \mathbf{x}\_0 = \mathbf{x} : \mu\_B(\mathbf{x}) = T\_{AB} \tag{5.8}$$

where *X* ⊂ **R** is a domain of given OFNs, μ*A*(*x*), μ*B*(*x*) are membership functions of *A* and *B*, and *DB* is the direction determinant of *B* for given *x*.

Figure 5.3 shows the result of compatibility of *A* with *B*, when *A* is a singleton. For this example the truth value is *TAB* = 0, 25 and the direction determinant is *DAB* = −0, 75. The *DAB* can be interpreted as an indication of shifts of *A* to *B*. The negative values mean the shift in the direction of the *up-part* of *B*, and the positive shift in the direction of the *down-part* of *B*. Such behavior can also be understood as a kind of directed relative dependence between values.

An Ordered Fuzzy Number can be understood as an extension of classical fuzzy numbers; the result of the fuzzy expression "*A is B*" should be an extension of the classical solution. It is important that the boundary dependencies for truth values are preserved in the new proposition. Especially when there is no shared part of the support between the numbers *A* and *B*, the truth value of the result is zero. On the other hand, when *A* is the same number as *B*, the truth value is equal to one regardless of the directions of the numbers. In addition to these results, we also achieve intuitive behavior of results with partial compatibility.

It is understandable that the expression "*A is B*" in a context of the truth value is symmetrical. However, if we want use direction-sensitive methods we need a tool that gives us different results in such contexts as presented above in Definition 4.

The examples in Figs. 5.4 and 5.5 present the results of DFC with different directions of the OFNs. For both cases we can observe that truth value results are the same. But the difference is specified just by the direction determinant.

However, for the opposite direction of OFNs (see Fig. 5.5) the direction determinants are the same. As we remember, the determinant part of the result indicates the

**Fig. 5.4** The compatibility between two OFNs with the same direction

**Fig. 5.5** The compatibility between the OFNs with the opposite directions

shift of *A* to *B*. For "*A is B*" *A* is shifted to *B* in the direction of the *down-part* of *B*, and for the "*B is A*" *B* is shifted to *A* in the direction of the *down-part* of *A*. Thus both shifts in the context of parts of OFNs have the same direction.

To preserve usefulness the above compatibility with classical fuzzy ideas is important to retain some clue behavior. That is, if the truth value of compatibility is equal to 1, this means we are not analyzing the direction determinants. Such a solution preserves the boundary dependencies: when the truth value is zero we have no compatibility, and with the truth value equal to one we have full compatibility regardless of the direction.

It must be emphasized that the direction determinant can be used as a tool for measurement and comparison of the directions of OFNs in different ways. Methods concerning direction should use that parameter as an element in their definition, but if we want to use OFNs in data processing only for their good arithmetic then we can ignore the direction determinant and use only the truth value for further processing.

#### **5.4 Inference Sensitive to Direction**

One of the main applications of fuzzy sets is a fuzzy system. Its core is a base of rules. Apart from the initial Chaps. 1 and 2 of this monograph, there are many publications that consist of the overviews of basic conceptions of fuzzy sets and modeling fuzzy systems [3, 16, 18, 19, 26]. The general advantage of fuzzy systems is the possibility to model the rules easily using linguistic description.

The basis for the processing of fuzzy rules is the operators of inference. They describe algorithms for transferring given fuzzy input into a fuzzy answer. Generally these methods are based on implications. However, there are also popular solutions including the MIN or PROD, which formally are not the implications, but their practical usefulness is proved. If we deal with quantitative imprecise data, we can use the OFNs instead of classical fuzzy numbers. We can ignore the direction and use the same methods. However, if we want to process additional information contained in the new model, we need methods sensitive to the direction.

When processing imprecise information using classical fuzzy methods, we often have fuzzy numbers at the input. However, during the process, in principle we ignore the quantitative nature of the data, focusing primarily on their qualitative aspect. Thus, even if input data are the fuzzy number, we rarely also get the fuzzy number at the output before defuzzification. In some cases it can be somehow inconsistent. For example, in the rule, *"IF temperature is about* 10 ◦*C THEN heating should be about 200 W*," when processing data with classical fuzzy inference methods, in general, the output will not be a fuzzy number, although part of the rule, "Heating should be *about 200 W*," clearly suggests a quantitative output. It can be particularly difficult in the cases where the result of inference is to be used as fuzzy data without defuzzification later for the calculations in further processing of this information.

In the case of the OFN model and processing methods that can be called "arithmetic" (see [20, 21, 23, 24]), at each stage of the process we deal with the quantitative aspect of the data. Thus consistently we obtain fuzzy numbers at each step: the aggregation of premises, the inference, and the accumulation-aggregation of the rules answers.

#### *5.4.1 Directed Inference Operation*

An inference mechanism presented here is based on the generalized modus ponens (compare with the information in Chap. 2), where the main role is played by a rule of the type:

$$\textbf{IF} \quad X \quad is \quad A \quad \textbf{THEN} \quad Y \quad is \; B \tag{5.9}$$

where *A*, *B* are fuzzy values that model a rule and *X*,*Y* , input and output variables. In the generalized modus ponens, where the data are represented by fuzzy numbers (or sets), the whole mechanism of inference is closed in the mathematical rule. This rule describes an algorithm for calculation of the answer, *Y* value. Sometimes it is also called an inference operator (see [9, 17]).

The proposition presented here is dedicated for the OFN model, therefore in the rule (formula (5.9)) values are presented as such objects. The statement, "*X* is *A*," is calculated as compatibility between OFNs. The method was described in the previous section.

**Definition 5** For the rule as in formula (5.9) let *A* and *B* be the OFNs. Let *X* be the input value also represented by an OFN. The result of "*X* is *A*" is calculated as directed fuzzy compatibility; *COMPX A* = (*TX A*, *DX A*), where *TX A* is the truth value and *DX A* is the direction determinant part of *COMPX A*.

The **directed inference by the multiplication with a shift** (DIMS) are the calculations of answer *Y* of the following rule: if *TX A* = 0 there is no activation of the rule, therefore the answer is not calculated. In other cases,

$$\begin{array}{lcl} & Y = B + |D\_{XA}| \cdot c \\ \text{where} \\ c = & \begin{cases} s - B \ \vdots \ D\_{XA} < 0 \\ e - B \ \vdots \ D\_{XA} > 0 \end{cases} \end{array} \tag{5.10}$$

It is worth noting that this is not the classical logical inference. The truth value of the premise part of the rule is used to check whether the rule can be implemented at all. The specificity of the presented method is that the inference is made through arithmetic operations. We do processing of the quantitative data with calculations.

#### *5.4.2 Examples*

For better understanding of the proposed method, an example is useful. Let us assume that for the rule from formula (5.9) we have OFNs *A* as in Fig. 5.6a and *B* in Fig. 5.6b. In Fig. 5.6a we can also find the input value *X*.

According to the Definition 4 "*X is A*" is *COMPX A* = (*TX A* = 0.66; *DX A* = −0.33). Using the new inference we get the result shown in Fig. 5.6c. In Fig. 5.7a we have a situation where the *X* OFN value changes only a direction (but does not change the shape). This time the result of "*X is A*" is *COMPX A* = (*TX A* = 0.66; *DX A* = 0.33). As we can see in Fig. 5.7b the result of inference was changed. This is related to the change of direction determinant.

If we analyze the proposed method of inference in more detail, we can note that if the *DX A* is closer to −1, the result of inference will be the narrow fuzzy number situated at the *U P* part side of support of OFN *B*. On the other hand, when the *DX A* approaches 1, the result of inference is aimed at extreme values of support but on the *DOWN* side. Finally, when *DX A* = 0 and the *TX A* = 1 it means that the *X* is fully compatible with *A*. Thus the result of inference is exactly the number *B*, the value from the conclusion.

**Fig. 5.6 a** Example OFNs X and A; **b** OFN B from rule conclusion, **c** Y the result of inference operation

**Fig. 5.7 a** OFN A with opposite direction and X is the same as before; **b** the new Y result of inference operation

In practical applications (a fuzzy system, e.g.), a pair of values should be considered as a result of inference: the truth value of the premise part of a rule, and the OFN calculated in accordance with the Definition 5.

Comparability with conventional fuzzy inference operators is important to preserve in general similar usefulness in practical situations for the new conceptions. Therefore, behavior of the output of the inference in boundary cases is compatible with classical fuzzy solutions (see [3, 18, 19]). If there is no compatibility in the premise part "*X is A*", then the rule is not activated, and on other side if the activation is full, then the result is the exact value from a conclusion.

#### **5.5 Aggregation of OFNs**

A purpose of this section is to propose an aggregation operator that is generating intuitively good results as well as being consistent with the OFN model. The main basics of the proposition come from the paper [24]. The method presented here maintains the expected properties of the aggregate functions [2, 4]. Additionally, it also takes into account the key idea of OFNs of the direction of the components.

#### *5.5.1 The Aggregation's Basic Properties*

Generally, an aggregation is an operation used in those situations when we need to find a single value representing the set of various numbers/data. There can be different application areas specified where an aggregation [2] is needed, for example, making decisions based on multiple criteria, or choosing from a variety of peer evaluations, one of which is treated as the result of them all. One important area of application is also the aggregation of the rule premise in a rule-based fuzzy system, where we have many input variables. The aggregation operation is a function that converts a number of input data into a single value. Transformation depends on the chosen method, but it is expected that in the process of determination of the result all of the input data were considered (in some way). Typically, aggregations where the number of input data is greater than one are used. Moreover, to call a function an aggregation, it should have two elementary properties (see [4]):

1. Boundary conditions. If all input data are minimal (or maximal), the result will also be the minimal (maximal) value. In the case of aggregation *A* for values from interval [0, 1] (the range of values of a fuzzy set), when all the arguments are equal to 1, the result of aggregation is also equal to 1 and similarly for zeros:

$$\begin{aligned} A(0,0,\ldots,0) &= 0\\ A(1,1,\ldots,1) &= 1 \end{aligned} \tag{5.11}$$

2. Nondecreasing. The function is nondecreasing against each input variable. This means that the growth of any of the input data cannot cause a decrease of the result of aggregation *A*.

$$\forall\_{i=2..n} \mathbf{x}\_i \le \mathbf{y}\_i \land (\mathbf{x}\_1, \dots, \mathbf{x}\_n) \ne (\mathbf{y}\_1 \dots \mathbf{y}\_n) \implies A(\mathbf{x}\_1, \dots, \mathbf{x}\_n) < A(\mathbf{y}\_1, \dots, \mathbf{y}\_n) \tag{5.12}$$

Apart from these two elementary properties a number of other important properties such as continuity, symmetry (anonymity), and idempotency are pointed out [2, 4, 10].

Continuity means that a small change in one input argument implies small change of the result. In the context of engineering applications, continuity corresponds to intuition, which is related to the fact that a small error in the entry cannot cause a large error in the output.

Symmetry means the independence of the result from the sequence of input data. This property is also called anonymity, because based on the output it is not possible to determine the sequence of input values.

Idempotency means that if each independent input has the same value, this particular value will be the result of aggregation. It may be noted that the boundary conditions are, in fact, idempotent for the maximal and minimal values.

There are also many different properties that can characterize an aggregation operator [2, 4, 10]. However, those mentioned above are the most essential and desirable in practical applications.

#### *5.5.2 Arithmetic Mean Directed Aggregation*

The basic, simple, and intuitive idea is to use an arithmetic mean idea in aggregation. As the arithmetic operations (thus the adding too) are *sensitive to the direction*, therefore the aggregation based on them also will be. The flexibility of the calculations grants a possibility for freely mixing the OFN objects with crisp numbers in mathematical formulas. Thus we can define the aggregation exactly like the arithmetic mean for the real numbers and it will preserve the *sensitivity to the direction*.

**Definition 6** The result of **arithmetic mean directed aggregation** (**AMDA**) is OFN *A* calculated for *L* any set of OFNs such as:

$$A = \Sigma\_{i=1}^{n} \frac{L\_i}{n},\tag{5.13}$$

where *Li* ∈ *L* is the *i*th OFN object from *L*, and *n* is the amount of elements in *L*.

Figure 5.8 presents the example of aggregation of two OFNs.

#### *5.5.3 Aggregation for Premise Parts of Fuzzy Rules*

Definition 6 from the previous section is simply the direct transfer of the idea of arithmetic mean into the OFN space of all OFNs. However, the popular application

**Fig. 5.8** Result of AMDA operation for two OFNs *L*<sup>1</sup> and *L*<sup>2</sup>

of the aggregations of fuzzy sets, and also fuzzy numbers, is a fuzzy rule with many input variables (see Chap. 2). Such rules have a premise part with a number of elementary fuzzy expressions of type *"X is L"*. For example,

**IF** *X*<sup>1</sup> *is L*<sup>1</sup> *AND X*<sup>2</sup> *is L*<sup>2</sup> *AND* ... *AND Xn is Ln* **THEN**... (5.14)

where *Xi* are the fuzzy input data, *Li* is the fuzzy set/number from a linguistic model, and *i* = 1, ..., *n* is the number of input variables in the rule.

To use an OFN model in such a rule we need an aggregation consistent with the fuzzy expression's compatibility calculation presented in Sect. 5.3. Below is presented the proposition based directly on *AMDA* and designated specially for inference rules, and thus called **arithmetic mean directed inference aggregation (AMDIA)**. It uses the *direction determinant* idea. The main purpose of the proposal is to calculate the level of activation or firing strength for a rule.

**Definition 7** Let's assume that the general pattern of the premise part of a rule *R* is specified in formula (5.14). The result of **arithmetic mean directed inference aggregation** *AR* of fuzzy expressions from the premise part of the rule *R* is calculated as a DFC (*directed fuzzy compatibility* see Sect. 5.3), thus it is a pair: truth value *TR* and direction determinant *DR*.

$$A\_R = (T\_R, D\_R) \tag{5.15}$$

The algorithm specifying *AR* is presented as the following steps.

1. Calculation of set *A* = {*A*1, *A*2, ..., *An*} containing elements that are the results of all fuzzy expressions from the premise part

$$A\_i = COMP\_{X\_i L\_i} = (T\_{X\_i L\_i}, D\_{X\_i L\_i}).\tag{5.16}$$

2.

$$
\Xi\_{T\_i=0} \Rightarrow T\_R = 0, \ D\_R \text{ is unspecified} \tag{5.17}
$$

If there is at least one fuzzy expression with the truth value equal to 0, then the truth value of the aggregation result is also zero. Therefore this rule is inactivated, and the direction determinant is undefined.

3. Otherwise,

$$\begin{aligned} T\_R &= \Sigma\_{i=1}^n \frac{T\_i}{n}, \\ D\_R &= \Sigma\_{i=1}^n \frac{D\_i}{n}. \end{aligned} \tag{5.18}$$

The proposed aggregation operator for the OFN generates a result with two components. For the calculation of each of them the arithmetic mean is used. Because the arithmetic mean is a function fulfilling the basic criteria of aggregation operators (see [2, 4, 10] and Sect. 5.5.1), the AMDIA also fulfills them.

It is worth noting that we are dealing with two different parameters: the truth value (degree of membership) and the direction determinant. However, they are not completely independent, therefore, it is worth having a look at some important dependencies between them. The direction determinant of the result equal to zero indicates that the activation is not moved from the *CONST* interval in any direction. Note that this happens only in two cases:


Let's take a closer look at the first case. The level of activation may be only equal to 1 when the determinant is equal to zero. This means that in the case of complete compatibility of premises the given data do not represent any direction. This is especially important if we want to combine the concept of OFNs with the ideas for classical fuzzy sets. In such a way the fundamental meaning of full membership (also the full nonmembership) coincides in both solutions.

Finally, an alternative conception should be analyzed. It may be tempting to use the geometric mean instead of arithmetic in the aggregation. It seems good for truth values, due to the fact that if we have zero for at least one input, it is automatically zero for the truth of aggregation result and generally cancels the rule from further computations. Unfortunately, for the same reason it may not be used for calculating the direction determinant part of the result. The zero value of the direction determinant of elementary fuzzy expression means in most cases full compatibility (truth value equal to one). It is against intuition that only one full compatibility of one fuzzy expression will automatically grant no direction for the aggregation result, no matter how many other expressions have only partial compatibility.

#### **5.6 Summary**

All sections of this chapter can be treated as an introduction to tendency-sensitive data processing with the use of Ordered Fuzzy Numbers. The basic tool for linguistic modeling is the operation **directed fuzzy compatibility** used to calculate a result of the expression, "*X is A*". The inference operator **DIMS** is another important tool for the practical use of sensitivity to direction. Both propositions use an idea of the direction determinant, which can be treated as a general parameter for measuring direction. Together these propositions can also be used for practical defining and realization of the full fuzzy system based on rules type "*IF-THEN*", which is sensitive to the direction/tendency of information presented by OFNs. If a fuzzy system needs rules that use more input values there is the proposal of the *arithmetic mean directed inference aggregation* method which is also based on the idea of direction determinant.

To generate one fuzzy answer from all rule outputs a simple calculation can be used. It is the idea of weighted mean where weights are the levels of activation of the rules (see [21]):

$$Y = \frac{\sum\_{i=1}^{k} (a\_i \cdot Y\_{Ri})}{\sum\_{i=1}^{k} a\_i} \tag{5.19}$$

where *k* is the amount of rules, *ai* is the value of activation for the *i* rule, and *YRi* is the OFN output for the *i* rule. For such calculations the result will always be an OFN. A key observation for this solution is that rules that were not activated (activation equals 0) have no participation in the final result. Calculation of the fuzzy answer of all rules results is also a form of aggregation (see Sect. 5.5), sometimes also called an "accumulation."

When we have one OFN as the result of a system, we can defuzzify it. For this purpose, we use one of the classic fuzzy methods as the mean of maxima, or the *center of mean inclination* method mentioned in Definition 4.4 from previous chapter. It is based on the specific parameter of OFN, an *inclination*. As the aggregation of premises and inference operator are sensitive to the direction, the OFN-based fuzzy system will also be characterized by this property. Therefore, the accumulation and defuzzification methods proposed above do not need to fulfill the sensitivity postulate.

It should be underlined that defuzzification is a very important operation in terms of the practical usefulness of fuzzy concepts. There can be many applications where fuzzy elements are helpful but without rule/inference processing. This applies particularly to quantitative problems, when we need to calculate the result where data are fuzzy. Therefore developing the defuzzification methods independently of the fuzzy system application is an important issue. The next chapters in this part of the monograph (see also [1, 7, 15]) present other ideas and propositions to realize defuzzifications that consider specificity of the OFN model.

#### **References**


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Chapter 6 Comparing Fuzzy Numbers Using Defuzzificators on OFN Shapes**

**Jacek M. Czerniak, Wojciech T. Dobrosielski and Iwona Filipowicz**

**Abstract** This chapter concerns an issue of comparing fuzzy numbers. The relationship of similarity is probably the most widely used and most difficult to determine the measure of compliance precisely. Analysis of the similarity between two objects is an essential tool in biology, taxonomy, and psychology, and is the basis for reasoning by analogy. This chapter describes methods for determining the similarity used in fuzzy logic. Many of them were dedicated only to triangular or trapezoidal fuzzy numbers. This was a computing inconvenience and raised the question about the axiological basis for such comparisons. The authors have proposed two new approaches to comparing fuzzy numbers using one of the known fuzzy number extensions that are Ordered Fuzzy Numbers (OFNs). This has allowed us to simplify operations and eliminate said dualism. Two order-sensitive defuzzification methods are presented in the chapter. For OFN numbers with positive order (compliant with the direction of the OX axis increase) the results of defuzzifications are results for numbers of different notations, for example, L-R, whereas for numbers with negative orders, the defuzzification result changes. An important part of the chapter is a catalogue of the shapes of numbers in OFN notation. This is probably the first summary of basic shapes of those numbers with the results of defuzzifications using several methods.

**Keywords** Fuzzy logic · Ordered Fuzzy Numbers · OFN · Defuzzification

J.M. Czerniak (B) · W.T. Dobrosielski · I. Filipowicz

Kazimierz Wielki University in Bydgoszcz, Institute of Technology, ul. Chodkiewicza 30, 85-064 Bydgoszcz, Poland

e-mail: jczerniak@ukw.edu.pl

W.T. Dobrosielski e-mail: wdobrosielski@ukw.edu.pl

I. Filipowicz e-mail: iwofil@ukw.edu.pl

#### **6.1 Introduction**

In all fields of science for a long time it was necessary to compare certain objects. Some branches of science sought to answer the question about the nature of the similarities, whereas others needed precise formal definition. Comparison of two objects or occurrences can be seen as an attempt to determine the relation between them. The most important and most frequently used relations between objects are similarity, difference, and inclusion. In the literature, most attention is dedicated to the issue of the similarity of objects. In recent decades, the theory of fuzzy sets has been used in many areas of science and everyday life. The need to compare fuzzy sets emerged naturally from the very beginning of the theory. There are plenty of methods, often based on those used for conventional sets. Intensive development of fuzzy logic and its applications often need to identify new ways of comparing objects. This issue is particularly important in computer-aided decision support, classification, and processing of natural language. Although the issue of comparison is crucial for many applications of fuzzy set theory, still we failed to formalize clearly basic concepts such as similarity or inclusion. Some researchers concerned with fuzzy logic seek to define the concepts precisely, however, others questioned this approach, saying that imposing a rigid framework limits practical applications. Through years of development of fuzzy logic, many researchers have been developing methods of comparing sets and fuzzy numbers. Among them, it is impossible not to recall that several fuzzy number comparison methods and indices have been researched since 1977 by Zadeh [12], Yager [10, 11], Kaufman [14, 15], Chang [5], and Amado [1]. Bortolan and Degani [5] and Dadgostar [1] reviewed some of the methods for ranking fuzzy sets, including Yager's first, second, and third indexes, Chang's algorithm, Adamo's method, Baas and Kwakernaak's method [2], Baldwin and Guild's method [3], Kerre's method [9], Jain's method [7, 8], and Dubois and Prade's four grades [6] of dominance (PD, PSD, ND, NSD). Dadgostar and Kerr [1] proposed a consistent method, called the partial comparison method (PCM). Wang and Kerre [22, 23] proposed several axioms as reasonable properties to determine the rationality of a fuzzy ordering or ranking method and systematically compared a wide array of fuzzy ranking methods.

It appears that although defuzzification in some way deprives a fuzzy number of multidimensionality, this is a natural step preceding the comparison. Subsequent sections present some known defuzzification methods and two new methods proposed specifically for Ordered Fuzzy Numbers (OFNs). It has been proven that both new methods meet properties required for defuzzification operators.

**Fig. 6.1 a** OFN example, **b** OFN presented in relation to a classic fuzzy number, **c** *arrow* denotes the orientation and the order of inverted functions: first UP and then DOWN

#### **6.2 Formal Approach to the Problem**

The essence of an OFN is discussed in the introduction to this chapter. Redefinition of classic fuzzy sets, where, according to Zadeh, it is an organized pair, has widened the definition by an organized pair of functions. The OFN is defined as follows.

#### **Definition 1**

$$A = (\chi\_{up}, \chi\_{down})\tag{6.1}$$

where *xup*, *xdown* : [0, 1] → *R* are continuous functions.

These functions are called the up-part and down-part, respectively, where both parts are connected by a constant function equal to 1. The order of a fuzzy number is its arrangement so that the up-part is the beginning of the OFN and the down-part is the end of this number.

Interpretation of the Ordered Fuzzy Number is shown in Fig. 6.1, where an example of an OFN is referred to a classic fuzzy number. The defuzzification process, as the last step in the three-step model of fuzzy control, converts a fuzzy set into a single real (defuzzified) value, on which the membership function is defined. The following expression describes defuzzification in a formal way.

#### **Definition 2**

$$W = \{ f : X \to [0, 1] \} \to \, X \tag{6.2}$$

where *W* is the defuzzification operator, *f* is the membership function, and *X* the universe on which membership functions are defined.

The process can be characterized on the basis of the properties, which are more desirable for a particular system. Considering the type of system, one can distinguish a fuzzy inference system, for which such property as processing power, is less important than for a diffuse control system, for which the processing power is an important parameter. The study [35, 37] introduced criteria of defuzzification operators for classic fuzzy numbers, on the basis of which individual defuzzification methods were assessed. The main conclusion is that there is no all-purpose defuzzification method. Defuzzification methods should be oriented to their field of application. For example, maximization methods, which include LOM (last of maxima) and FOM (first of maxima), are more suitable for inference systems. Research, which has been carried out by the authors of the above-mentioned study, proved that the distribution and field methods are more suitable for applications where control systems are used. Those methods include COG (center of gravity) and COA (center of area).

Upon development of Ordered Fuzzy Numbers, the authors of the paper [7, 20, 26] proposed criteria for defuzzification methods. That gave grounds for guidelines enabling the creation of suitable models of defuzzification operators. The following four conditions should be met for most of the methods.

**Definition 3** Each functional φ is defined on *R* with the properties:

$$
\phi(c) = c \tag{6.3}
$$

$$
\phi(A+c) = \phi(A) + c \tag{6.4}
$$

$$
\phi(cA) = c\phi(A)\tag{6.5}
$$

$$
\phi(A) \ge 0 \quad \text{if} \quad A \ge 0 \tag{6.6}
$$

is called a defuzzification functional,

where φ is a representation defined on the set of real numbers, and φ(*c*) is understood as the defuzzification of the *c* value on the set of real numbers. In other words, the defuzzification using the singleton method should give a defuzzified number (6.3). Condition (6.4) is related to additiveness, and it requires the defuzzification value for the sum of components to equal the sum of defuzzifications for individual components. Condition (6.5) requires the representation φ to be homogeneous (first degree); that is, if the argument is multiplied by a factor then the result will also be multiplied by some power of this factor. In this case, that power amounts to one. Condition (6.6) refers to the positive sense of a functional. Detailed interpretation of individual conditions is provided in the study by [5, 30].

#### **6.3 Defuzzification Methods**

It is well known that the defuzzification process reduces the fuzzy set to an individual defuzzified value. The mechanism of that operation consists mainly in the use of an appropriate defuzzification method. Available methods include the following classic solutions.

**FOM, first of maxima**: This method is **FOM** a method concerning the choice of the smallest element of the set core **A**, where the defuzzification value represents the relationship (6.7).

$$FOM(A) = \min \, core(A) \tag{6.7}$$

**LOM, last of maxima**: The appropriate choice of the maximum value of an element from the set core **A**, is the **LOM** method, the formula of which is presented below:

$$LOM(\mathbf{A}) = \max \operatorname{core}(\mathbf{A})\tag{6.8}$$

**MOM, mean of maxima**: The formula (6.9) illustrates the use of **FOM** and **LOM** as methods, the defuzzification values of which take into account the minimum and maximum elements of the fuzzy set core **A**. The resulting value is the mean value of those two methods.

$$MOM(A) = \frac{\min \, core(A) + \max \, core(A)}{2} \tag{6.9}$$

**RCOM, random choice of maxima**: The method is also called defuzzification from a core, because the defuzzification value is always included in the core of a fuzzy set. The defuzzification value of this method is a random element *x* ∈ *core*(*A*) calculated as a probability:

$$RCOM(A) = P(\mathbf{x}) = \frac{\lambda(\mathbf{x})}{\lambda(core(A))}\tag{6.10}$$

where λ is the Lebesgue measure in universe *X*.

**MOS, mean of support**: Defuzzification method **MOS**, the defuzzification value of which is the mean value of the **A** number carrier.

$$MOM(A) = \frac{supp(A)}{2} \tag{6.11}$$

**COG, center of gravity**: The most widespread method, which is based on determination of the center of gravity of the analyzed system. In the fuzzy number A defuzzification process, the **COG** method is expressed as the formula (6.12).

104 J.M. Czerniak et al.

$$COG(A) = \frac{\int\_{a}^{b} \mathbf{x} \mu\_{A}(\mathbf{x}) d\mathbf{x}}{\int\_{a}^{b} \mu\_{A}(\mathbf{x}) d\mathbf{x}} \tag{6.12}$$

**BADD, basic defuzzification distribution**: The defuzzification method proposed [24] as an extension of COG and MOM methods. We obtain the following defuzzification value from the fuzzy set A.

$$BADD(A) = \frac{\int\_a^b \mathbf{x} \mu\_A^\mathcal{V}(\mathbf{x}) d\mathbf{x}}{\int\_a^b \mu\_A^\mathcal{V}(\mathbf{x}) d\mathbf{x}} \tag{6.13}$$

Depending on parameter γ ∈ [0,∞], BADD may assume the following instances: when γ = 0, *BADD*(*A*) = *MOS*(*A*); when = 1, *BADD*(*A*) = *COG*(*A*); and when γ → ∞, *BADD*(*A*) = *MOM*(*A*).

#### *6.3.1 Defuzzification Methods for OFN*

Classic defuzzification methods presented in the above parts of the chapter are reflected in Ordered Fuzzy Numbers. In the analysis of methods shown below, one of their explanations includes important characteristic elements of OFNs presented in Fig. 6.2.

In the definition of an Ordered Fuzzy Number expressed by the formula (6.1), an Ordered Fuzzy Number. A can also be defined, according to other approaches to that subject, as an oriented pair of continuous functions:

$$A = (\mathbf{f}\_{\mathbf{A}}, \mathbf{g}\_{\mathbf{A}}) \tag{6.14}$$

**Fig. 6.2** An OFN number and characteristic elements

where *fA*, *gA* : [0, 1] → *R*. The function *fA* is called the up-part *UPA* (beginning) of an Ordered Fuzzy Number *A*, and the function *gA* is called the-down part *DOWNA* (end) of an Ordered Fuzzy Number *A*.

In the interpretation of OFN defuzzification methods, the value of the *fA* function for 0 is *fA*, for 1 is *fA*(1), and of the *gA* function it is: for 0 *gA*(0) and for 1 is *gA*(1).

$$
\phi\_{FOM}(f, \mathbf{g}) = f(\mathbf{l})\tag{6.15}
$$

$$\phi\_{LOM}(f,\mathbf{g}) = \mathbf{g}(\mathbf{l})\tag{6.16}$$

$$\phi\_{MOM}(f,\mathbf{g}) = \frac{f(\mathbf{l}) + \mathbf{g}(\mathbf{l})}{2} \tag{6.17}$$

$$\phi\_{ROM}(f,\mathbf{g}) = \zeta f(1) + (1-\xi)\mathbf{g}(1), \quad \xi = [0,1] \tag{6.18}$$

$$\phi\_{COG}(f,g) = \begin{cases} \frac{1}{\int\_0^1 \frac{f(s) + g(s)}{2} |f(s) - g(s)| ds} \int\_0^1 |f(s) - g(s)| ds \neq 0\\ \frac{\int\_0^1 f(s) ds}{\int\_0^1 ds} & , for \int\_0^1 |f(s) - g(s)| ds = 0 \end{cases} \tag{6.19}$$

$$\phi\_{\text{RADD}}(A, \lambda) = \frac{\phi\_{\text{RADD}}(A, \lambda) - \lambda}{\frac{1}{\int\_0^1 |f(s) - g(s)| \cdot x^{\lambda - 1} ds}}, \text{ for } \lambda \in [0, 1] \tag{6.20}$$

$$\phi\_{GM}(f,\mathbf{g}) = \frac{f(\mathbf{l}) \cdot \mathbf{g}(\mathbf{0}) - f(\mathbf{0}) \cdot \mathbf{g}(\mathbf{l})}{f(\mathbf{l}) + \mathbf{g}(\mathbf{0}) - f(\mathbf{0}) - \mathbf{g}(\mathbf{l})} \tag{6.21}$$

The above formulas (6.15–6.21) are interpretations of classic defuzzification methods. In the discussed OFN theory [30] and in earlier studies, the geometrical mean method is proposed, which was created by D. Wilczy´nska-Sztyma [38].

#### **6.4 Definition of Golden Ratio Defuzzification Operator**

At this point we present a proposal for a new method of defuzzification of a fuzzy controller, which is based on the concept of the golden ratio (GR), derived from the Fibonacci series. The origin of the method was the observation of numerous instances of the golden ratio in such diverse fields as biology, architecture, medicine, and painting. A particular area of its occurrence is genetics, where we find the golden ratio in the very structure of the DNA molecule (deoxyribonucleic acid molecules are 21 angstroms wide and 34 angstroms long for each full length of one double helix cycle). This fact makes the ratio in the Fibonacci series in some sense a universal design principle used by man and nature alike.

The Fibonacci series is based on the assumption that it starts with two ones, and each consecutive number is the sum of the previous two. The proposal for the golden ratio method of defuzzification is based on the proportion of the golden ratio. As a result of dividing each of the numbers by its predecessor, we always obtain quotients oscillating around the value of 1.618, the golden ratio number. The exact value of the limit is the golden number itself:

$$\lim\_{k \to 0} \frac{k\_{n+1}}{k\_n} = 1,618033998875\dots = \Phi \tag{6.22}$$

The possibility of using this formula in the process of defuzzification is another example of the universality of the method, as it is applied in the new domain of fuzzy logic theory. Calculation of the classical formula of the golden mean assumes that two values of line segments *a* and *b* are in golden ratio Φ to each other if:

$$\frac{a+b}{a} = \frac{a}{b} = \Phi \tag{6.23}$$

In this case, one method of finding the value of Φ is to transform the left-hand fraction of Eq. (6.23) into:

$$\frac{a+b}{a} = 1 + \frac{b}{a} = 1 + \frac{1}{\Phi}, \text{ where } \frac{b}{a} = \frac{1}{\Phi} \tag{6.24}$$

Following subsequent transformations of Eq. (6.24) we obtain the quadratic Eq. (6.25), for which we calculate the roots.

$$
\Phi^2 - \Phi - 1 = 0\tag{6.25}
$$

As appropriate, using transformations of the formula in (6.25), we obtain two square roots (6.26).

$$\Phi\_1 = \frac{1+\sqrt{5}}{2} \text{ or } \Phi\_2 = \frac{1-\sqrt{5}}{2} \tag{6.26}$$

In view of the fact that the value of Φ must be positive, in our example we select the positive root, as in Eq. (6.27).

$$\Phi = \Phi\_1 = \frac{1 + \sqrt{5}}{2} = 1,618033998875\dots \tag{6.27}$$

In sum, the ratio between two objects a and b is called the golden ratio when the value of Φ = 1.61803398875 ... .

**Fig. 6.3** Golden ratio defuzzification value

The method of the golden ratio for a fuzzy number is Eq. (6.28):

#### **Definition 4**

$$\begin{aligned} GR &= \min(\text{supp}(A)) + \frac{|\text{supp}(A)|}{\Phi} \\ \text{where } \Phi &= 1, 618033998875\dots \end{aligned} \tag{6.28}$$

where *GR* is the defuzzification operator and *supp*(*A*) is the support for fuzzy set *A* in universe *X*.

#### *6.4.1 Golden Ratio for OFN*

The mathematical formula (6.28) of the equation as well as the graphic interpretation presented in Fig. 6.3 applies to convex fuzzy numbers. In reference to the OFN, which has orientation, we should use another equation. Therefore, the interpretation of the proposed method is shown in Figs. 6.4 and 6.5.

We note that the individual parts of the two values of line segments *a* and *b* take up positions in relation to direction of the OFN. In the first case we have a positive OFN where a larger part of the golden ratio starts from base point *f*(0). In the second case, which is negative OFN, we have a base point as *g*(0). The method of the golden ratio for OFN is Eq. (6.29):

**Fig. 6.4** OFN number A = [0, 2, 4, 10]

**Fig. 6.5** OFN number B = [10, 4, 2, 0]

**Definition 5**

$$\begin{cases} \label{eq:1} \begin{aligned} GR(A) &= \\ \min(\text{supp}(A)) + \frac{|\text{supp}(A)|}{\Phi}, & \text{if } order \ (A) \text{ is positive} \\\\ \max(\text{supp}(A)) - \frac{|\text{supp}(A)|}{\Phi}, & \text{if } order \ (A) \text{ is negative} \end{aligned} \end{cases} \tag{6.29}$$

The instrument of the golden ratio, as proposed in this chapter for fuzzy numbers, may serve as another defuzzification method. As a mathematical apparatus that affords wide-ranging possibilities in description and processing of information, it becomes a new solution in constructing models of fuzzy controllers used as tools for inferencing or control.

#### **6.5 Golden Ratio**

Let

$$\operatorname{supp}(A) = \begin{cases} \operatorname{g}\_A(0) - f\_A(0) \text{ if } ordered \text{ A is positive} \\\\ f\_A(0) - \operatorname{g}\_A(0) \text{ if } ordered \text{ A is negative} \end{cases} \tag{6.30}$$

Let

$$\min(\text{supp}(A)) = \begin{cases} f\_A(0) \text{ if } ordered \text{ A is positive} \\\\ \text{g}\_A(0) \text{ if } ordered \text{ A is negative} \end{cases} \tag{6.31}$$

Let

$$\max(\text{supp}(A)) = \begin{cases} \text{g}\_A(0) \text{ if } ordered \text{ A is positive} \\\\ f\_A(0) \text{ if } ordered \text{ A is negative} \end{cases} \tag{6.32}$$

Symbol Φ is designated with a golden number, as Φ = 1, 680 ... .

**Definition 6** The functional ϕ*GR* : *R* → *R*, called the golden ratio, is expressed with the formula:

$$\varphi\_{GR} = \begin{cases} \min(\text{supp}(A)) + \frac{\text{supp}(A)}{\Phi} & \text{if } ordered \ A \text{ is positive} \\ \max(\text{supp}(A)) - \frac{\text{supp}(A)}{\Phi} & \text{if } ordered \ A \text{ is negative} \end{cases} \tag{6.33}$$

**Theorem 1** *Mapping of* ϕ*GR* : *R* → *R expressed with the formula (6.33) is a defuzzification functional.*

#### **6.6 Defuzzification Conditions for GR**

Recall that, by the definition of adding fuzzy numbers and multiplication of a fuzzy number by a real number, the following equalities apply.

$$f\_{A+c^+}(\mathbf{s}) = f\_A(\mathbf{s}) + c \quad ona \mathbf{z} \tag{6.34} \\ \mathbf{g}\_{A+c^+}(\mathbf{s}) = \mathbf{g}\_A(\mathbf{s}) + c \quad \tag{6.34}$$

dla *s* ∈ *R* oraz *c*<sup>+</sup> -crisp number

$$f\_{cA}(\mathbf{s}) = \mathbf{c} \cdot f\_A(\mathbf{s}) \quad \text{or} \mathbf{z} \tag{6.35} \\ \text{grad} \qquad \qquad \mathbf{g}\_{cA}(\mathbf{s}) = \mathbf{c} \cdot \mathbf{g}\_A(\mathbf{s}) \tag{6.35}$$

dla *s* ∈ *R*

It is easy to see that

$$\text{supp}(A + c^{+}) = \text{supp}(A)\tag{6.36}$$

$$\operatorname{supp}(c \cdot A) = c \cdot \operatorname{supp}(A) \tag{6.37}$$

Namely, using (6.34) we obtain the following for *A* of positively ordered numbers.

$$\text{supp}(A + c^{+}) = \text{g}\_{A + c^{+}}(0) - f\_{A + c^{+}}(0) = \text{g}\_{A}(0) + c - f\_{A}(0) - c = \text{supp}(A) \tag{6.38}$$

By analogy, we obtain (6.36) for *A* of negatively ordered numbers.

In order to show (6.37) for *A* of negatively ordered numbers we use (6.35).

$$\operatorname{supp}(c \cdot A) = \operatorname{g}\_{c \cdot A}(0) - f\_{c \cdot A}(0) = c \cdot \operatorname{g}\_A(0) - c \cdot f\_A(0) = c \cdot \operatorname{supp}(A) \tag{6.39}$$

By analogy, we prove (6.37) dla *A* of negatively ordered numbers. It follows directly from (6.34) and (6.35) that

$$
\min(\text{supp}(A + c^+)) = \min(\text{supp}(A)) + c \quad \text{and} \tag{6.40}
$$

$$
\max(\text{supp}(A + c^+)) = \max(\text{supp}(A)) + c
$$

and

$$
\min(\text{supp}(c \cdot A)) = c \cdot \min(\text{supp}(A)) \quad \text{and} \tag{6.41}
$$

$$
\max(\text{supp}(c \cdot A)) = c \cdot \max(\text{supp}(A))
$$

#### *6.6.1 Normalization*

#### *Proof* **normalized** (6.3)

The normalization property results directly from the definition of 6, because

$$\varphi\_{GR}(c^{+}) = \min(\text{supp}(c^{+})) + \frac{\text{supp}(c^{+})}{\Phi} = c + \frac{c^{+}(0) - c^{+}(0)}{\Phi} = c \qquad (6.42)$$

Therefore, we have shown that ϕ*GR* fulfills the homogeneity condition; that is:

$$
\varphi\_{GR}(c^+) = c \tag{6.43}
$$

#### *6.6.2 Restricted Additivity*

Now let us show the restricted additivity property.

#### *Proof* **restricted additivity** (6.4):

From the Definition 6 of the golden ratio functional, we obtain

$$\begin{split} \varphi\_{GR}(A + c^{+}) &= \min(\text{supp}(A + c^{+})) + \frac{\text{supp}(A + c^{+})}{\Phi} \\ &\quad \text{for } \text{ positively ordered} \quad A \end{split} \tag{6.44}$$

and

$$\varphi\_{GR}(A + c^{+}) = \max(\sup(A + c^{+})) + \frac{\sup(A + c^{+})}{\Phi} \tag{6.45}$$
 
$$\text{for} \quad \text{negatively} \quad \text{ordered} \ A$$

It follows directly from (6.40) and (6.36) that

$$\begin{aligned} \varphi\_{\rm GR}(A + c^{+}) &= c + \left( \min(\text{supp}(A)) + \frac{\text{supp}(A)}{\Phi} \right) = \varphi\_{\rm GR}(A) + c\\ &\quad \text{for } \text{ positively ordered } A \end{aligned} \tag{6.46}$$

and

$$\varphi\_{\rm GR}(A + c^{+}) = c + \left(\max(\text{supp}(A)) + \frac{\text{supp}(A)}{\Phi}\right) = \varphi\_{\rm GR}(A) + c \tag{6.47}$$
 
$$\text{for} \quad \text{negatively} \quad \text{ordered} \ A$$

Therefore, we have shown that ϕ*GR* fulfills the restricted additivity condition; that is:

$$
\varphi\_{GR}(A + c^{+}) = \varphi\_{GR}(A) + c \tag{6.48}
$$

#### *6.6.3 Homogeneity*

*Proof* **homogeneity** (6.5): Based on the Definition 6 we obtain the following.

$$\varphi\_{GR}(c \cdot A) = \min(\sup(c \cdot A)) + \frac{\sup(c \cdot A)}{\Phi} \tag{6.49}$$
 
$$\text{for } \text{ positively ordered } A$$

and

112 J.M. Czerniak et al.

$$\begin{aligned} \varphi\_{GR}(c \cdot A) &= \max(\sup(c \cdot A)) + \frac{\sup(c \cdot A)}{\Phi} \\ &\quad \text{for\\_negatively\\_ordered\ A} \end{aligned} \tag{6.50}$$

It follows directly from (6.41) and (6.37) that

$$\begin{aligned} \varphi\_{GR}(c \cdot A) &= c \cdot \min(\text{supp}(A)) + \frac{\text{supp}(A) \cdot c}{\Phi} \\ &= c \cdot \left( \min(\text{supp}(A)) + \frac{\text{supp}(A)}{\Phi} \right) = c \cdot \varphi \end{aligned} \tag{6.51}$$
 
$$\text{for } \text{ positively ordered } A$$

and

$$\varphi\_{GR}(c \cdot A) = c \cdot \max(\text{supp}(A)) + \frac{\text{supp}(A) \cdot c}{\Phi}$$

$$= c \cdot \left(\max(\text{supp}(A)) + \frac{\text{supp}(A)}{\Phi}\right) = c \cdot \varphi\_{GR} \tag{6.52}$$

$$\text{for } \text{negatively } \text{ ordered } A$$

Therefore, we have shown that

$$
\varphi\_{\rm GR}(\mathbf{c} \cdot \mathbf{A}) = \mathbf{c} \cdot \varphi\_{\rm GR}(\mathbf{A}) \tag{6.53}
$$

The equalities (6.43), (6.48), and (6.53) imply that ϕ *GR* is a defuzzification functional, which was to be proven.

#### **6.7 Definition of Mandala Factor Defuzzification Operator**

Buddhist monks can create amazing pictures with colored sand grains. Those pictures are called mandala. It is difficult to name them paintings because we expect paintings to be rather more lasting. Anyone who has ever seen meditating monks creating, grain after grain, a previously designed picture, remembers such a conclusion for a long time. You can observe the beauty of their art and on the other hand the transitory nature (in the literal sense) of the technique they use is evident. The same reverence is seen in Christianity in the Eastern Orthodox rite when icons are painted, but fortunately for culture and art, the effects of the work can be seen for a long time. The Buddhist mandala is a harmonious combination of a wheel and a square, where the wheel is a symbol of heaven, transcendence, externality, and infinity, and the square depicts the inner sphere, that is, the matters associated with a human and the earth. Both figures are linked by the central point, which is both the start and end of the entire system. The mandala creation process itself, as well as its destruction, is a religious act (Fig. 6.6).

The mandala factor defuzzification operator is inspired by mandala. Let A be a given fuzzy number shown in Fig. 6.2. Let it assume the shape of a trapezoid in Fig. 6.7a. A trapezoid can in a particular case come down to atriangle, but we remain at a trapezoid, which makes our analysis more universal. Then one must fill in the outline marked by the sides of the number and the OX axis with virtual grains of sand in Fig. 6.7a. A number of virtual sand grains are collected in this way. Then one must construct a rectangle, the base of which is equal to the support value of the fuzzy number. The rectangle built in such a manner should be filled with virtual sand grains, starting from the outermost left side in Fig. 6.7b. The filling process should be done vertically in columns until all grains are used. A real number obtained as a result of defuzzification is the value above which the last filled column was finished.

Mathematical formalism (6.54) of the above-described mandala factor visualization is shown below. Calculation of the *R* value uses the mandala factor *<sup>M</sup>* for the rising edge, falling edge, and core set function integral. Then the obtained value should be scaled from the center of the coordinate system by adding it to the start of the support value of the fuzzy number. When defuzzification is performed in the OFN arithmetic, then in the case of a positive order, one should proceed as described below, whereas in the case of a negative order, one should deduct the calculated value

**Fig. 6.7** Mandala factor visualization

from the first coordinate of the OFN corresponding to the outermost right side of the OFN support.

#### **Definition 7**

$$MF(A) = \begin{cases} c+r, \; iforder\; (A) \; is\; positive\\ c-r, \; iforder\; (A) \; is\; negative \end{cases} \tag{6.54}$$

where

$$r = \frac{1}{d-c} \int\_{c}^{d} \mathbf{x} \, d\mathbf{x} - \frac{c}{d-c} \int\_{c}^{d} d\mathbf{x} + \frac{f}{f-e} \int\_{f}^{e} d\mathbf{x}$$

$$-\frac{1}{f-e} \int\_{e}^{f} \mathbf{x} \, d\mathbf{x} + \int\_{d}^{e} d\mathbf{x} \tag{6.55}$$

#### **6.8 Mandala Factor**

**Definition 8** The *MF* : *R* → *R*, called the mandala factor, is expressed by the formula:

$$MF(A) = \begin{cases} f\_A(0) + r \stackrel{\circ}{\text{if } ordered \ A} \text{ is positive} \\ g\_A(0) - r \stackrel{\circ}{\text{if } ordered \ A} \text{ is negative} \end{cases} \tag{6.56}$$

where

*r <sup>A</sup>* <sup>=</sup> <sup>1</sup> *fA*(1) − *fA*(0) *fA*(1) *fA*(0) *xdx* <sup>−</sup> *fA*(0) *fA*(1) − *fA*(0) *fA*(1) *fA*(0) *dx* <sup>+</sup> *gA*(0) *gA*(0) − *gA*(1) *g <sup>A</sup>*(0) *gA*(1) <sup>−</sup> <sup>1</sup> *gA*(0) − *gA*(1) *g <sup>A</sup>*(0) *gA*(1) *xdx* + *g <sup>A</sup>*(1) *fA*(1) *dx* (6.57)

and *rA* = 0 for *A* such that *fA* = *const* lub *gA* = *const* (in particular *rc*<sup>+</sup> = 0).

#### **6.9 Defuzzification Conditions for MF**

Proposition

The mandala factor is a defuzzification functional.

#### *6.9.1 Normalization*

#### *Proof* **normalized** (6.3)

It results directly from the definition that

$$MF(c^{+}) = c + \, \_{c^{+}}^{r} = c \tag{6.58}$$

fulfills the normalization condition.

#### *6.9.2 Restricted Additivity*

#### *Proof* **restricted additivity** (6.4):

Based on the definition of the mandala factor, we obtain the following.

$$MF(A + c^{+}) = \begin{cases} f & (0) + \underset{A + c^{+}}{\text{ if } ordered \text{ A is positive}} \\ \underset{A + c^{+}}{\text{g}} & (0) - \underset{A + c^{+}}{\text{ if } ordered \text{ A is negative}} \end{cases} \tag{6.59}$$

whereas

$$\begin{split} \int\_{A+c^{+}} &= \frac{\int\_{A+c^{+}} \text{(1)} \qquad \int\_{A+c^{+}} \text{(1)} \qquad \int\_{A+c^{+}} \text{(1)} \\ &= \frac{1}{\int\_{A+c^{+}}} \text{(1)} - \int\_{A+c^{+}} \text{(0)} \qquad \int\_{A+c^{+}} \text{(1)} - \int\_{A+c^{+}} \text{(0)} \\ &= \frac{\text{g} \quad \text{(0)}}{\text{g} \quad \text{(1)}} - \frac{\text{g} \quad \text{(0)}}{\text{g} \quad \text{(1)}} - \frac{\text{g} \quad \text{(0)}}{\text{g} \quad \text{(1)}} \\ &+ \frac{\text{g} \quad \text{(1)}}{\text{g} \quad \text{(1)}} - \frac{\text{g} \quad \text{(1)}}{\text{g} \quad \text{(1)}} - \frac{1}{\text{A+c}^{+}} \qquad \int\_{A+c^{+}} \text{xdx} \\ &= \frac{\text{g} \quad \text{(1)}}{\text{g} \quad \text{(1)}} - \frac{\text{g} \quad \text{(1)}}{\text{g} \quad \text{(1)}} \end{split} \tag{6.60}$$

In view of the above Eqs. 6.60 and 6.56 to show the restricted additivity property it is sufficient to demonstrate that

$$\underset{A}{r} = \underset{A+c^{+}}{r} \tag{6.61}$$

Operations on OFNs imply that ∀ *s*∈*R*

$$\begin{cases} \begin{array}{l} f \quad (\text{s}) = f(\text{s}) + c \\ \text{s}^{A + c^{+}} \quad \text{ $A$ } \\ \text{g} \quad (\text{s}) = \text{g}(\text{s}) + c \end{array} \tag{6.62}$$

First, we note that

$$\begin{aligned} \int\_A^{f(1)+c} \int\_A^{f(1)} d\mathbf{x} &= f(1) - f(0) = \int\_A^c d\mathbf{x} \\ \int\_A^{f(0)+c} \int\_A^{f(0)} &= \int\_A^{f(0)} \end{aligned} \tag{6.63}$$

and

$$\begin{aligned} \int\_A^{f(1)+c} \\ \int\_A^f x dx &= \\ \frac{1}{2} \left( \left( f(1) \right)^2 - \left( f(0) \right)^2 \right) + c \left( f(1) - f(0) \right) \\ \frac{f\_1(1)}{\lambda} &= \frac{f\_1(1)}{\lambda} \\ &= \int x dx + c \int\_A dx \\ f\_{(0)} &= \frac{f\_1(0)}{\lambda} \end{aligned} \tag{6.64}$$

Of course, if the function *gA* is used in the formulas (6.63) and (6.64), instead of *fA* we then get similar equivalences; that is:

$$\begin{aligned} \mathop{\rm g}\_{A}^{(0)+c} & \mathop{\rm g}\_{A}^{(0)} \\ \int\_{A}^{\!\!\!} d\mathbf{x} &= \int\_{A}^{\!\!\!\!} d\mathbf{x} \\ \mathop{\rm g}\_{A}^{(1)+c} & \mathop{\rm g}\_{A}^{(1)} \end{aligned} \tag{6.65}$$

$$\begin{aligned} \stackrel{\mathcal{g}(0)+c}{\int\_A^A dx} &= \int\_A^{\mathcal{G}(0)} \, dx + c \int\_A^{\mathcal{G}(0)} dx\\ \stackrel{\mathcal{g}(1)+c}{\int\_A^{\mathcal{G}(1)}} &= \int\_A^{\mathcal{G}(1)} \, dx \end{aligned} \tag{6.66}$$

$$\begin{aligned} \stackrel{\mathcal{g}(1)+c}{\int\_A^A d\mathbf{x}} &= \stackrel{\mathcal{g}(1)}{\int\_A d\mathbf{x}} \\ \stackrel{f\_(1)+c}{\int\_A^{f\_(1)}} &= \stackrel{\mathcal{f}(1)}{\int\_A^{f\_(1)}} \end{aligned} \tag{6.67}$$

Using (6.60) and (6.62) we get

$$\begin{aligned} \int\_{A+c^{+}}^{f(1)+c} &= \frac{1}{f(1)-f(0)} \int\_{A}^{f(0)+c} x dx - \frac{f(0)+c}{f(1)-f(0)} \int\_{A}^{f(1)+c} dx \\ &\quad + \frac{g(0)+c}{A} \int\_{A}^{g(0)+c} - \frac{g(0)+c}{A} \int\_{A}^{g(0)+c} dx \\ &\quad + \frac{g(0)+c}{g(0)-g(1)} \int\_{A}^{f} dx - \frac{1}{g(0)-g(1)} \int\_{A}^{f} x dx \\ &\quad + \frac{g(1)+c}{A} \int\_{A}^{g(1)+c} dx - \frac{g(1)+c}{A} \int\_{A}^{g(1)+c} dx \\ &\quad + \int\_{A}^{f} dx \\ &\quad + \int\_{A}^{f(1)+c} \end{aligned} (6.68)$$

Now the equalities (6.63), (6.64), (6.65), (6.66), and (6.67) are applied to the above formula (6.68) and we obtain

$$\begin{aligned} \underset{A\rightarrow P}{\begin{subarray}{c}\boldsymbol{f}\end{subarray}}&=\frac{1}{f(1-f(0))}\left(\int\_{A}^{f(1)}dx+c\int\_{A}^{f(1)}dx\right)-\frac{f(0)}{f(1-f(0))}\int\_{A}^{f(1)}dx\\ &\int\_{f(0)}^{f(0)}dx+\int\_{A}^{f(0)}dx-\int\_{A}^{f(0)}\frac{f(0)}{f(0)}\\ &-\frac{f(1)-f(0)}{f(1)-f(0)}\int\_{A}^{f(0)}dx+\frac{g(0)}{g(0)-g(1)}\int\_{A}^{f(0)}dx+\frac{c}{g(0)-g(1)}\int\_{A}^{f(0)}dx\\ &-\frac{1}{g(1)-f(0)}\int\_{A}^{f(0)}dx-\frac{1}{A}\int\_{A}^{f(0)}dx+\frac{c}{A}\int\_{A}^{f(0)}dx\\ &-\frac{1}{g(1)-f(0)}\left(\int\_{A}^{f(0)}dx+c\int\_{A}^{f(0)}dx\right)+\int\_{A}^{f(0)}dx\\ &=\frac{1}{f(0)-f(0)}\int\_{A}^{f(0)}dx-\frac{f(0)}{f(1)-f(0)}\int\_{A}^{f(0)}dx+\frac{g(0)}{g(1)-g(1)}\int\_{A}^{f(0)}dx\\ &=\frac{1}{f(1)-f(0)}\int\_{A}^{f(0)}dx-\frac{f(1)-f(0)}{f(1)-f(0)}\int\_{A}^{f(0)}dx+\frac{g(0)}{g(1)-g(1)}\int\_{A}^{f(0)}dx\\ &\qquad-\frac{1}{g(1)-f(1)}\int\_{A}^{f(0)}dx-\frac{f(0)}{f(1)-f(0)}\int\_{A}^{f(0)}dx\end{aligned}$$

It follows directly from the equality (6.61) and the Definition 8 of the mandala factor that

$$MF(A + c^{+}) = \underset{A + c^{+}}{f}(0) + \underset{A + c^{+}}{r} = f(0) + c + \underset{A}{r} = MF(A) + c \tag{6.70}$$
 
$$\text{if } order \text{ A is positive}$$

and

$$MF(A + c^{+}) = \underset{A + c^{+}}{\text{g}}(0) + \underset{A + c^{+}}{r} = \underset{A}{g}(0) + c + \underset{A}{r} = MF(A) + c \tag{6.71}$$
 
$$\text{if } order \text{ A is negative}$$

which proves the restricted additivity property.

#### *6.9.3 Homogeneity*

#### *Proof* **of homogeneity** (6.5)

It follows directly from the mandala factor Definition 8 that

$$MF(cA) = \begin{cases} f(0) + \underset{cA}{\text{if } ordered \text{ A is positive}}\\ \underset{cA}{g}(0) - \underset{cA}{\text{if } ordered \text{ A is negative}} \end{cases} \tag{6.72}$$

whereas

$$r\_{cA} = \frac{1}{f(1) - f(0)} \int\_{cA}^{f(1)} x dx - \frac{f(0)}{f(1) - f(0)} \int\_{cA}^{f(1)} dx$$

$$r\_{cA} = \frac{g(0)}{cA} \int\_{cA}^{g(0)} \frac{g(0)}{cA} \int\_{cA}^{g(0)} f(0) dx}{1 - \int\_{cA}^{g(0)} \frac{g(0)}{cA} \int\_{cA}^{g(1)}} \tag{6.73}$$

$$r + \frac{g(0)}{cA} \int\_{cA}^{g(0)} dx - \frac{1}{g(0) - g(1)} \int\_{cA} x dx + \int\_{cA} dx$$

for *A* such that *f A* = *const* oraz *g A* = *const* and *c* = 0 and *r <sup>A</sup>* <sup>=</sup> 0 dla *<sup>c</sup>* <sup>=</sup> 0. It results from operations on OFNs that for ∀ *s*∈*R*

$$\begin{cases} f\,(\mathbf{s}) = c \ast f(\mathbf{s})\\ \, \_{cA} \\ \, \_{cA} = c \ast \, \_{A} \mathbf{g}(\mathbf{s}) \end{cases} \tag{6.74}$$

Formulas (6.72), (6.74), and (6.56) imply that for any homogeneity it is sufficient to indicate the following equality

$$\underset{cA}{r} = \underset{A}{r} \tag{6.75}$$

First, we note that

$$\int\_{A}^{f\_{(1)}^{f\_{(1)}}} dx = c \begin{pmatrix} f\_{(1)} \\ f(1) - f(0) \\ f\_{(1)} \end{pmatrix} = c \int\_{f\_{(0)}^{(0)}} dx \tag{6.76}$$

and

$$\int\_{\begin{subarray}{c}\text{c}\\f\_{A}(0)\end{subarray}}^{f\_{(1)}^{f\_{(1)}}} \mathbf{x}d\mathbf{x} = \frac{1}{2}c^{2}\left(\binom{f\_{(1)}}{A}^{2} - \binom{f\_{(1)}}{A}^{2}\right) = c^{2}\int\_{A}^{1} \mathbf{x}d\mathbf{x}\tag{6.77}$$

Obviously, use of the function *g A* instead of *f A* in the above formulas and results in analogous equalities; that is:

$$\begin{aligned} \mathop{\rm g}\_{\text{cl}}^{\text{(0)}} & \mathop{\rm g}\_{\text{A}}^{\text{(0)}} \\ \int\_{\text{cl}}^{\text{(1)}} d\mathbf{x} &= c \int\_{\text{s}}^{\text{(1)}} d\mathbf{x} \\ \mathop{\rm g}\_{\text{cl}}^{\text{(1)}} & \mathop{\rm g}\_{\text{A}}^{\text{(1)}} \end{aligned} \tag{6.78}$$

$$\begin{aligned} \stackrel{\mathcal{G}^{(0)}}{\int\_A^A d\mathbf{x}} &= c^2 \int\_A^A \mathbf{x} d\mathbf{x} \\ \stackrel{\mathcal{G}^{(1)}}{\int\_A^{\mathcal{G}^{(1)}}} &= \stackrel{\mathcal{G}^{(1)}}{\int\_A^{\mathcal{G}^{(1)}}} \end{aligned} \tag{6.79}$$

$$\begin{aligned} \stackrel{\mathbf{g}(1)}{\underset{\mathbf{c}^{\mathbf{d}}}{\right]}{\mathbf{d}} d\mathbf{x} &= \mathbf{c} \int d\mathbf{x} \\ \stackrel{\mathbf{f}(1)}{\underset{\mathbf{c}^{\mathbf{d}}}{\mathbf{d}}} \qquad & \stackrel{\mathbf{f}(1)}{\mathbf{d}} \end{aligned} \tag{6.80}$$

It follows directly from z (6.73) and (6.74) that for dla *A* such that *f A* = *const* and *g A* = *const* and *c* = 0

$$\begin{split} &r\_{cA} = \frac{\operatorname\*{c}t\_A^{f(1)}}{\operatorname\*{c}\left(f(1) - f(0)\right)} \int\_{C\_A^{f(0)}} \operatorname{xd}x - \frac{\operatorname\*{c}f(0)}{\operatorname\*{c}\left(f(1) - f(0)\right)} \int\_{C\_A^{f(0)}} \operatorname{xd}x \\ &+ \frac{\operatorname\*{c}g(0)}{\operatorname\*{c}\left(g(0) - g(1)\right)} \int\_{C\_A^{g(0)}}^{\operatorname\*{c}g(0)} \operatorname{xd}x - \frac{\operatorname\*{c}g(0)}{\operatorname\*{c}\left(\operatorname\*{c}f(0) - g(1)\right)} \int\_{C\_A^{g(1)}}^{\operatorname\*{c}g(1)} \operatorname{xd}x \\ &+ \frac{\operatorname\*{c}g(0) - g(1)}{\operatorname\*{c}\left(\operatorname\*{c}f(0) - \operatorname\*{c}g(1)\right)} \int\_{A}^{\operatorname\*{c}g(1)} \operatorname{xd}x - \frac{\operatorname\*{c}f(1)}{\operatorname\*{c}\left(\operatorname\*{c}f(1) - \operatorname\*{c}f(0)\right)} \int\_{A}^{\operatorname\*{c}g(1)} \operatorname{xd}x. \end{split} \tag{6.81}$$

As can be easily seen, using (6.76), (6.77), (6.78), (6.79), and (6.80) we get (6.75) *r cA* <sup>=</sup> *c r A* .

namely,

*r cA* <sup>=</sup> <sup>1</sup> *c f A* (1) − *f A* (0) · *<sup>c</sup>*<sup>2</sup> *f A* (1) *f A* (0) *xdx* − *f A* (0) *f A* (1) − *f A* (0) · *<sup>c</sup> f A* (1) *f A* (0) *dx* + *g A* (0) *g A* (0) − *g A* (1) · *<sup>c</sup> g A* (0) *g A* (1) *dx* <sup>−</sup> <sup>1</sup> *c g A* (0) − *g A* (1) · *<sup>c</sup>*<sup>2</sup> *g A* (0) *g A* (1) *xdx* + *c g A* (1) *f A* (1) *dx* = *c* · ⎡ ⎢ ⎢ ⎢ ⎢ ⎣ 1 *f A* (1) − *f A* (0) *f A* (1) *f A* (0) *xdx* − *f A* (0) *f A* (1) − *f A* (0) *f A* (1) *f A* (0) *dx* + *g A* (0) *g A* (0) − *g A* (1) *g A* (0) *g A* (1) *dx* <sup>−</sup> <sup>1</sup> *g A* (0) − *g A* (1) *g A* (0) *g A* (1) *dx* + *g A* (1) *f A* (1) *dx* ⎤ ⎥ ⎥ ⎥ ⎥ ⎦ = *c* · *r A* (6.82)

Therefore

$$MF(cA) = f\,(0) + \, \_{cA}^{r} = c \cdot f(0) + c \cdot \frac{r}{A} = c \left( f(0) + \frac{r}{A} \right) = c \cdot MF(A) \tag{6.83}$$
 
$$\text{if } order \, A \text{ is positive}$$

and

$$MF(c\mathbf{A}) = \underset{c\mathbf{A}}{\mathbf{g}}(\mathbf{0}) + \underset{c\mathbf{A}}{r} = c \cdot \mathbf{g}(\mathbf{0}) + c \cdot \underset{\mathbf{A}}{r} = c \left(\underset{\mathbf{A}}{\mathbf{g}}(\mathbf{0}) + \underset{\mathbf{A}}{r}\right) = c \cdot MF(\mathbf{A})\tag{6.84}$$

if order A is negative

which ends the proof of the restricted homogeneity property.

#### **6.10 Catalogue of the Shapes of Numbers in OFN Notation**

Figures 6.8 to 6.31 constitute the catalogue of basic shapes of numbers in OFN notation including the results of defuzzifications using several methods (Figs. 6.8, 6.9, 6.10, 6.11, 6.12, 6.13, 6.14, 6.15, 6.16, 6.17, 6.18, 6.19, 6.20, 6.21, 6.22, 6.23, 6.24, 6.25, 6.26, 6.27, 6.28, 6.29, 6.30 and 6.31).

**Fig. 6.17** Number E'[6, 5, 3, 3] negative oriented

**Fig. 6.18** Number F[−4, −1, −3, 0] positive oriented

**Fig. 6.16** Number

**Fig. 6.23** Number H'[5, 7, 4, 5] negative oriented

**Fig. 6.24** Number J[2, 3, 7, 4] positive oriented

**Fig. 6.29** Number M'[3, 4, 4, 1] negative oriented

**Fig. 6.30** Number N[1, 0, 3, 3] positive oriented

oriented

**Fig. 6.28** Number M[1, 4, 4, 3] positive

#### **6.11 Conclusion**

The chapter presents two new original defuzzification methods: The golden ratio and mandala factor. Each is characterized by unique properties worthy to be noted. Real number values obtained through the operation of each operator are unique and different from those obtained using known methods. The golden ratio and mandala factor operation can therefore be applied in well-known and widely used arithmetics of fuzzy numbers such as L-R Dubois and Prade notation [20]. As shown in the calculations presented in the previous section the obtained results distinguish new operators from the classic, commonly known solutions. New operators are also characterized by the feature, which is absent in most of the classic operators. This feature is the sensitivity to order (order sensitive). This feature manifests so that different defuzzification values are obtained from one shape of a fuzzy number, depending on the fuzzy number order type (*positive* or *negative*) (Ordered Fuzzy Numbers). This is shown in the previous section. Basic shapes of the Ordered Fuzzy Numbers are visualized as shown in this chapter. To sum up, it can be concluded that both defuzzification methods, that is, the Golden ratio and mandala factor, meet all the criteria of defuzzification operators, and are adapted to applications in all fuzzy number arithmetics, including Kosi ´nski's OFN arithmetic. After defuzzification of OFN numbers, one can trivially use relationship operators in order to make comparisons. This is an easy and intuitive method. It should be added that the defuzzification methods should be selected as a result of empirical research on a given category of data.

## **References**


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Chapter 7 Two Approaches to Fuzzy Implication**

**Magdalena Kacprzak and Bartłomiej Starosta**

**Abstract** We discuss construction of fuzzy implication and also correlation between negation and implication operators defined on fuzzy values. Two structures for fuzzy implications are studied: the lattice of Step-Ordered Fuzzy Numbers (SOFNs) and the Boolean algebra B of membership degrees for metasets. Even though these two approaches stem from completely different areas it turned out that they lead to similar applications and results. Both of them emerged from research conducted by W. Kosi ´nski and can be applied not only in the most popular application field which is approximate reasoning but also for designing decision-support systems, enriching methods and techniques of opinion mining, or modeling fuzzy beliefs in multiagent systems.

## **7.1 Introduction**

In his recent research Kosi ´nski focused on new fields for applications of Ordered Fuzzy Numbers (OFNs) [24–26]. One of the promising domains was approximate reasoning involving fuzzy implication. Among the results of this development one has to mention Prokopowicz's dissertation dealing with definition of engineering implications. Another branch of this development, fuzzy implication on Step-Ordered Fuzzy Numbers (SOFNs), which emerged as the result of cooperation with Kacprzak, is presented in the following. At that time Kosi ´nski, as the Starosta's PhD supervisor, also took part in the development of metaset theory. The metaset concept is an alternative approach to fuzzy membership, which has many interesting properties. Some of them are related to fuzzy implication and many-valued logics and are presented in the following. In this chapter we confront two approaches to fuzzy implication: OFN based and metaset based.

B. Starosta

M. Kacprzak (B)

Bialystok University of Technology, Bialystok, Poland e-mail: m.kacprzak@pb.edu.pl

Polish-Japanese Academy of Information Technology, Warsaw, Poland e-mail: barstar@pjwstk.edu.pl

Fuzzy implication is an operation computing the fulfillment degree of a rule expressed by IF X THEN Y, where the antecedent and the consequent are fuzzy. These functions must comply with certain basic properties and the most typical is the Kleene-Dienes implication, based on the classical implication definition (*x* → *y* ≡ ¬*x* ∨ *y*), using the Zadeh negation and the maximum S-norm, but other fuzzy implication functions exist. On the other hand, fuzzy implication is an extension of the classical implication operator in which the two values involved and the result are not necessarily true or false (1 or 0), but can belong to the set [0,1]. Thus, it is a function *f* : [0, 1]→[0, 1].

Kosi ´nski's effort was aimed at proposing an implication operation on OFNs analogous to classical implication, which preserves its main properties. One of them says that for any two formulas α and β, formula if α then β, that is, α → β is equivalent to formula ¬α ∨ β. We want to obtain a similar equality for OFNs. The problem is with operation of negation. Because the set of all OFNs is not a complete lattice, the way of defining the implication is not straightforward. In 2011 Kacprzak and Kosi ´nski proposed a new binary operator on the set *N* called *2K-fuzzy implication* that satisfies conditions of fuzzy implication, classically formulated in the theory of fuzzy sets [6] for two-value operations on a complete lattice (in the particular case on the interval [0, 1]) requiring it to be decreasing with respect to the first variable and increasing with respect to the second variable. It is an open question how to define negation and implication on the set of all OFNs *R*.

During fruitful discussions with Kosi ´nski it turned out that metaset theory has all the capabilities necessary for defining fuzzy implication as well as for its applications. Metasets admit partial membership of its members. Consequently, they allow formalization of properties satisfied with degrees other than complete truth or falsity. Metaset sentences express vague properties and they are evaluated in a Boolean algebra. Therefore, defining implication on their certainty values is straightforward. As opposed to the original Kosi ´nski idea based on OFNs, the implication developed for metasets operates on crisp values, not fuzzy ones. Collection of all these values, however, forms a structure (the Boolean algebra) that enables expressing imprecision with the help of sentences of the metaset language.

In this chapter we examine two approaches. Therefore, it is divided into two main sections: Sect. 7.2 summarizes Step-Ordered Fuzzy Numbers and gives the construction of fuzzy implications defined on these numbers; next, Sect. 7.3 discusses the Boolean algebra of membership degrees for metasets and introduces metasetbased implication. Finally, in Sect. 7.4 we provide a summary of both approaches and outline directions for future research.

#### **7.2 Lattice Structure and Implications on SOFNs**

Orthodox Ordered Fuzzy Number *A* is defined as an ordered pair of continuous real functions specified on the interval [0, 1]; that is,

$$A = (f, g)$$

#### 7 Two Approaches to Fuzzy Implication 135

with

$$f, \mathbf{g} : [0, 1] \to \mathbf{R}.$$

In this chapter, the set of all OFNs is denoted by *R*. The continuity of both functions implies that their images are bounded intervals, say *UP* and *DOWN*, respectively. The following symbols are used to mark boundaries for *UP* = [*lA*, 1<sup>−</sup> *<sup>A</sup>* ] and for *DOWN* = [1<sup>+</sup> *<sup>A</sup>* , *pA*]. If we further assume that *f* and *g* are monotone (and consequently invertible), and add the constant function on the interval [1<sup>−</sup> *<sup>A</sup>* , 1<sup>+</sup> *<sup>A</sup>* ] with its value equal to 1, we might define the membership function

$$\mu(\mathbf{x}) = \begin{cases} \mu\_{up}(\mathbf{x}) & \text{if} \quad \mathbf{x} \in [l\_A, 1\_A^{-}] = [f(0), f(1)],\\ \mu\_{down}(\mathbf{x}) & \text{if} \quad \mathbf{x} \in [1\_A^{+}, p\_A] = [\mathbf{g}(1), \mathbf{g}(0)],\\ 1 & \text{if} \quad \mathbf{x} \in [1\_A^{-}, 1\_A^{+}]. \end{cases} \tag{7.1}$$

where


Obtained in this way the membership function μ(*x*), *x* ∈ **R** represents a mathematical object that refers to a convex fuzzy number in the classical sense [10, 34]. However, we can observe here some limitations. This is because some membership functions already known in the classical theory of fuzzy numbers (cf. [10, 18, 46]) cannot be obtained by taking inverses of continuous functions *f* and *g* in the process described above. These are the functions that are piecewise constant; that is, μ*up* and μ*do*w*<sup>n</sup>* are not strictly monotone. The lack of strict monotonicity implies that functions inverse to μ*up* and μ*do*w*<sup>n</sup>* do not exist in the classical sense. To cope with this problem Kosi ´nski offered to accept some limitations assuming that for both functions μ*up* and μ*do*w*<sup>n</sup>* there exist a finite (or at most countable) number of such constancy subintervals, and then the inverse functions are piecewise continuous and monotone with a finite (or at most countable) number of discontinuity points [36]. In this way we can employ a class of functions larger than continuous ones. This is the class of real-valued functions of *bounded* (*finite*) *variation*, *BV* [41].

#### *7.2.1 Step-Ordered Fuzzy Numbers*

In 2006 Kosi ´nski introduced a generalization of the original definition of OFNs to make the algebra a more efficient tool in dealing with imprecise, fuzzy quantitative terms [36].

**Definition 1** By an OFN *A* (in the generalized form) we mean an ordered pair (*f* , *g*) of functions such that *f* , *g* : [0, 1] → **R** are of bounded variation, that is, *f* , *g* ∈ *BV*.

Let *RBV* denote the set of all generalized OFNs, that is, those that meet Definition 1. Notice that all convex fuzzy numbers are contained in this new space, *R* ⊂ *RBV* . Operations for generalized OFNs are defined in a similar way to operations for orthodox OFNs, the norm, however, will change into the norm of the Cartesian product of the space of functions of bounded variations.

An important consequence of this generalization is the possibility of introducing a subspace of an OFN composed of pairs of step functions [37]. First, a natural number *K* is fixed and [0, 1) is split into *K* − 1 subintervals [*ai*, *ai*+1); that is,

$$\bigcup\_{i=1}^{K-1} [a\_i, a\_{i+1}) = [0, 1),$$

where

$$0 = a\_1 < a\_2 < \cdots < a\_K = 1.$$

Now, define a step function *f* of resolution *K* by putting value *ui* ∈ **R** on each subinterval [*ai*, *ai*+<sup>1</sup>). Each such function *f* is identified with a *K*-dimensional vector; that is,

$$f \sim \mathfrak{u} = (\mathfrak{u}\_1, \mathfrak{u}\_2, \dots, \mathfrak{u}\_K) \in \mathbf{R}^K,$$

where the *K*th value *uK* corresponds to *y* = 1; that is, *f*(1) = *uK*. Taking a pair of such functions we have an OFN from *RBV* .

**Definition 2** By a Step-Ordered Fuzzy Number *A* of resolution *K* we mean an ordered pair (*f* , *g*) of functions such that *f* , *g* : [0, 1]→**R** are step functions of resolution *K*.

We use *R<sup>K</sup>* for denotation of the set of elements satisfying the above definition. The example of an SOFN (also called Step Kosi ´nski's fuzzy number, SKFN) and its membership relation (represented by a curve) are shown in Figs. 7.1 and 7.2. The set *R<sup>K</sup>* ⊂ *RBV* has been extensively elaborated in [22, 35].

We can identify *<sup>R</sup><sup>K</sup>* with the Cartesian product of **<sup>R</sup>***<sup>K</sup>* <sup>×</sup> **<sup>R</sup>***<sup>K</sup>* because each *<sup>K</sup>*-step function is represented by its *K* values. It is obvious that each element of the space *R<sup>K</sup>* may be regarded as an approximation of elements from *RBV* ; by increasing the number *K* of steps we are getting a better approximation. The norm of *R<sup>K</sup>* is assumed to be the Euclidean one of **R**<sup>2</sup>*<sup>K</sup>*, thus we have an inner-product structure at our disposal.

Now let *B* be the set of two binary values: 0, 1 and let us introduce the particular subset *N* of *R<sup>K</sup>*

$$\mathbb{C}\mathcal{A}' = \{ \mathbf{A} = (\underline{\mathbf{u}}, \underline{\mathbf{y}}) \in \mathcal{A}\_K : \underline{\mathbf{u}} \in \mathcal{\mathcal{A}}^K, \underline{\mathbf{y}} \in \mathcal{\mathcal{A}}^K \}. \tag{7.2}$$

It means that each such component of the vector *u* as well as of *v* has value 1 or 0. Because each element of *N* is represented by a 2*K*-dimensional binary vector the

**Fig. 7.1** Example of a Step-Ordered Fuzzy Number *A* = (*f* , *g*) ∈ *RK*, **a** function *f* , **b** function *g*

cardinality of the set *N* is 2<sup>2</sup>*<sup>K</sup>*. The set *N* consists of all binary SOFN, also called Binary Step Kosi ´nski's Fuzzy Numbers (BSKFN).

**Definition 3** By a BSKFN *A* of resolution *K* we mean an ordered pair (*f* , *g*) of functions such that *f* , *g* : [0, 1]→*B* are step functions of resolution *K*.

## *7.2.2 Lattice on R<sup>K</sup>*

Let us consider the set *R<sup>K</sup>* of SOFNs with operations

$$A \wedge B = \colon F \quad \text{and} \quad A \vee B = \colon G$$

defined for each two fuzzy numbers *A* = (*fA*, *gA*), *B* = (*fB*, *gB*) by the relations:

$$F = (f\_F, \mathcal{g}\_F), \text{ if } f\_F = \sup \{ f\_A, f\_B \}, \mathcal{g}\_F = \sup \{ \mathcal{g}\_A, \mathcal{g}\_B \}, \tag{7.3}$$

$$F = (f\_F, \mathcal{g}\_F), \text{ if } f\_F = \inf \{ f\_A, f\_B \}, \mathcal{g}\_F = \inf \{ \mathcal{g}\_A, \mathcal{g}\_B \}. \tag{7.4}$$

Notice that ∨ and ∧ are actually operations in *RK*; that is, they are defined for all *A*, *B* ∈ *R<sup>K</sup>* and the result of the operations is in *RK*. Next, let us observe that operation ∨ is

• Idempotent: Whenever it is applied to two equal values, it gives that value as the result:

$$A \vee A = (\sup \{ f\_A, f\_A \}, \sup \{ g\_A, g\_A \}) = (f\_A, g\_A) = A,$$

• Commutative:

$$A \vee B = (\sup\{f\_A, f\_B\}, \sup\{\mathbf{g}\_A, \mathbf{g}\_B\}) = (\sup\{f\_B, f\_A\}, \sup\{\mathbf{g}\_B, \mathbf{g}\_A\}) = B \vee A,$$

• Associative:

$$(A \lor B) \lor C = (\sup \{ f\_A, f\_B \}, \sup \{ g\_A, g\_B \}) \lor C = \newline (\sup \{ f\_A, g\_B, g\_C \}) = A \lor (\sup \{ f\_B, f\_C \}, \sup \{ g\_B, g\_C \}) = A \lor (B \lor C).$$

$$A \lor (B \lor C).$$

The same properties characterize the operation ∧. Moreover, these two operations are connected by the absorption law:

$$A \wedge (A \vee B) = A \wedge (\sup \{ f\_A, f\_B \}, \sup \{ g\_A, g\_B \}) = $$

$$(\inf \{ f\_A, \sup \{ f\_A, f\_B \} \}, \inf \{ g\_A, \sup \{ g\_A, g\_B \} \}) = (f\_A, g\_A) = A$$

and similarly for

$$A \lor (A \land B) = A.$$

The absorption laws ensure that the set *R<sup>K</sup>* with an order ≤ defined as

$$A \le B \quad \text{iff} \quad B = A \lor B \tag{7.5}$$

is a partial order within which meets and joins are given through the operations ∨ and ∧. It is easy to show that for every *A*, *B* ∈ *R<sup>K</sup>* it holds that *A* ∨ *B* = *B* iff *B* − *A* ≥ 0. Moreover, joints and meets exist for every two elements of *R*. The following theorem is the consequence of the above reasoning.

**Theorem 1** *The algebra* (*RK*, ∨, ∧) *is a lattice.*

## *7.2.3 Complements and Negation on N*

Now let us consider the subset *N* of *R<sup>K</sup>* defined in Sect. 7.2.1. As we have already noted above, every element of *N* can be represented by a binary vector and thereby *N* is isomorphic to the space of Boolean vectors. Below, we use the notation *A*(*a*1,*a*2,...,*a*2*<sup>K</sup>* ) for a number *A* represented by vector (*a*1, *a*2,..., *a*2*<sup>K</sup>*) and we show that *N* is a Boolean algebra.

It is easy to observe that all subsets of *N* have both a join and a meet in *N* . In fact, for every pair of numbers from the set {0, 1} we can determine *max* and *min* and it is always 0 or 1. Therefore *N* creates a *complete lattice*. In such a lattice we can distinguish the greatest element 1 = *A*(1,1,...,1) and the least element 0 = *A*(0,0,...,0).

**Theorem 2** *The algebra* (*N* , ∨, ∧) *is a complete lattice.*

In a lattice in which the greatest and the least elements exist it is possible to define complements. We say that two elements *A* and *B* are *complements* of each other if and only if

$$A \lor B = \underline{1} \quad \text{and} \quad A \land B = \underline{0}.$$

The complement of a number *A* is marked with ¬*A* and is defined as follows.

**Definition 4** Let *A*(*a*1,*a*2,...,*a*2*<sup>K</sup>* ) ∈ *N* be a SOFN. Then the complement of *A*(*a*1,*a*2,...,*a*2*<sup>K</sup>* ) equals

$$\neg A\_{(a\_1, a\_2, \dots, a\_{2K})} = A\_{(1-a\_1, 1-a\_2, \dots, 1-a\_{2K})} \cdot \iota$$

A bounded lattice for which every element has a complement is called a *complemented lattice*. The structure of Step-Ordered Fuzzy Numbers (*N* , ∨, ∧) forms complete and complemented lattices in which complements are unique. In fact it is a *Boolean algebra*. An example of such an algebra is depicted in Fig. 7.3. A set of universe is created by numbers

$$\square \mathcal{N} = \{ A\_{(a\_l, a\_2, a\_3, a\_4)} : a\_i \in \{0, 1\} \quad \text{for} \quad i = 1, 2, 3, 4 \}.$$

The complements of elements are:

$$
\neg A\_{(0,0,0,0)} = A\_{(1,1,1,1)}, \\
\neg A\_{(0,1,0,0)} = A\_{(1,0,1,1)}, \\
\neg A\_{(1,1,0,0)} = A\_{(0,0,1,1)} \\
\text{etc.}
$$

Now we can rewrite the definition of the complement in terms of a new mapping.

**Definition 5** For any *A* ∈ *N* we define its negation as

$$N(A) := (1 - a\_1, 1 - a\_2, \dots, 1 - a\_{2K}) \quad \text{for} \quad A = (a\_1, a\_2, \dots, a\_{2K}).$$

It is obvious, from Definitions 4 and 5, that the negation of a given number *A* is its complement. Moreover, the operator *N* is a strong negation, because it is involutive:

**Fig. 7.3** A complete and complemented lattice defined on the set *<sup>N</sup>* <sup>⊂</sup> **<sup>R</sup>**<sup>4</sup>

*N*(*N*(*A*)) = *A* for any *A* ∈ *N* .

One can refer here to known facts from the theory of fuzzy implications (cf. [6, 7, 21]) and write the strong negation *N* in terms of the standard strong negation *NI* on the unit interval *I* = [0, 1] defined by *NI*(*x*) = 1 − *x* , *x* ∈ *I*, namely *N*((*a*1, *a*2,..., *a*2*<sup>K</sup>*)) = ((*NI*(*a*1),*NI*(*a*2), . . . ,*NI*(*a*2*<sup>K</sup>*)).

#### *7.2.4 Fuzzy Implication on BSOFN*

The implication operator holds center stage in the inference mechanisms of any logic. Thus, the obvious question is whether and how one can define an implication on an OFN. Studies on this issue were initiated in the works by Kacprzak and Kosi ´nski in 2011 [28, 38]. The aim was to propose an implication operation on Ordered Fuzzy Numbers analogous to classical implication that preserves its main properties. In the literature we can find several different definitions of fuzzy implications. Some of them are built from basic fuzzy logic connectives. In Sect. 7.2.2 conjunction and disjunction operations for any two-order fuzzy numbers are defined. However, the main problem is the negation operation. In Sect. 7.2.3 complements for SOFNs from the set *N* are constructed. Thus given disjunction and complement, implication can be defined in the standard way. Such a new operator on the set *N* was introduced by Kacprzak and Kosi ´nski and is called *2K-fuzzy implication* [28, 29, 38]. The set of all OFNs is not a complete lattice, therefore the way of defining implication is still an open question.

In the classical Zadeh fuzzy logic the definition of a fuzzy implication on an abstract lattice*L* = (*L*, ≤*L*)is based on the notation from fuzzy set theory introduced in [21].


**Table 7.1** Examples of implications for SOFN

**Definition 6** Let *L* = (*L*, ≤*L*, 0*L*, 1*L*) be a complete lattice. A mapping *I* : *L*<sup>2</sup> → *L* is called a fuzzy implication on *L* if it is decreasing with respect to the first variable, increasing with respect to the second variable, and fulfills the border conditions

$$\mathcal{J}\left(\mathbf{0}\_{L},\mathbf{0}\_{L}\right) = \mathcal{J}\left(\mathbf{1}\_{L},\mathbf{1}\_{L}\right) = \mathbf{1}\_{L}\,,\mathcal{J}\left(\mathbf{1}\_{L},\mathbf{0}\_{L}\right) = \mathbf{0}\_{L}\,.\tag{7.6}$$

Now, possessing the lattice structure of *R<sup>K</sup>* and the Boolean structure of our lattice *N* , we can repeat most of the definitions known in Zadeh's fuzzy set theory. The first one is the Kleene-Dienes operation, called 2K-fuzzy implication [28]

$$\mathcal{J}\_b \mathcal{J}\_b(A, B) = N(A) \vee B \,, \text{ for any} \quad A, B \in \mathcal{J}' \text{ .} \tag{7.7}$$

In other words, the result of the binary implication *Ib*(*A*, *B*), denoted in [28] by *A* → *B*, is equal to the result of operation *sup* for the number *B* and the complement of *A*:

$$A \to B = \sup \{ \neg A, B \}.$$

For illustration, let us assume two numbers *A*(0,1,1,0) and *A*(0,1,0,1). The implication

$$A\_{(0,1,1,0)} \to A\_{(0,1,0,1)}$$

equals

$$N(A\_{(0,1,1,0)}) \lor A\_{(0,1,0,1)} = A\_{(1,0,0,1)} \lor A\_{(0,1,0,1)} = A\_{(1,1,0,1)}.$$

Examples of other implications are given in Table 7.1.

2K-fuzzy implication satisfies the basic property of logical implication: it returns *false* if and only if the first term is *true*, and the second term is *false*.

**Proposition 1** *Let us consider the Boolean algebra* (*N* , ∨, ∧, ¬, 1, 0)*. The values of the* 2*K -fuzzy implication on the greatest and the least elements of this algebra are given in Table7.2.*

In fact, because ¬ 0 = 1 and ¬ 1 = 0 it holds that:



**Table 7.2** Table of values of implications for the least element and the greatest elements of *N*

\*  $\underline{1} \to \underline{0} = N(\underline{1}) \lor \underline{0} = \underline{0} \lor \underline{0} = \underline{0} \cdot$  \*\*.\*\*  $\underline{1} \to \underline{1} = N(\underline{1}) \lor \underline{1} = \underline{0} \lor \underline{1} = \underline{1} \cdot$ 

Next we may introduce the Zadeh implication by

$$\mathcal{A}\_Z \mathcal{C}(A, B) = (A \wedge B) \vee N(A) \,, \text{ for any } A, B \in \mathcal{A}' \text{ .} \tag{7.8}$$

In our lattice *R<sup>K</sup>* the arithmetic operations are well defined, therefore we may introduce the counterpart of the Łukasiewicz implication by

$$\mathcal{J}\_L(A, B) = C \text{, where } C = 1 \land (1 - A + B) \text{.} \tag{7.9}$$

When calculating the right-hand side of (7.9) we have to regard all numbers as elements of *RK*, because by adding step fuzzy number *A* from *N* to the crisp number 1 we may leave the subset *N* ⊂ *RK*. However, the operation ∧ takes us back to the lattice *N* . It is obvious that in our notation 1*<sup>N</sup>* = 1. The explicit calculation is: if*C* = (*c*1, *c*2,..., *c*2*<sup>K</sup>*)), *A* = (*a*1, *a*2,..., *a*2*<sup>K</sup>*), *B* = (*b*1, *b*2,..., *b*2*<sup>K</sup>*), then *ci* = *min*{1, 1 − *ai* + *bi*}, where 1 ≤ *i* ≤ 2*K*.

It is obvious that all implications *Ib*, *I<sup>Z</sup>* , and *I<sup>L</sup>* satisfy the border conditions (7.6) as well as the fourth condition of the classical binary implication, namely *I* (0*N*, 1*N*) = 1*N*.

#### *7.2.5 Applications*

Initially, OFNs were designed to deal with optimization problems when data are fuzzy [14, 15, 17, 20]. When Kacprzak and Kosi ´nski observed that a subspace of OFNs, called SOFN, may be equipped with a lattice structure, it turned out that OFNs have a much wider field of application. The ability to define Boolean operations such as conjunction, disjunction, and, more important, diverse types of implications, has become the basis for creating a new logical system. In consequence, it turned out that SOFNs can be used not only for evaluation of linguistic statements such as, "A patient is fat" or "A car is fast," but also for approximate reasoning on such imprecise notions.

One of the important applications is employing SOFNs in multiagent systems for modeling agents' beliefs about fuzzy expressions [27]. This can be helpful in evaluating features of multiagent systems concerning agents' fuzzy beliefs. If some sentence is expressed by an agent in a multiagent system then we could try to evaluate the level of truth for an agent's belief about another agent's belief. This is the first step in the application of the fuzzy logic that stands behind the SOFN.

Just before his death, Kosi ´nski with his coworkers Kacprzak andW¸egrzyn-Wolska showed another application of SOFNs in specification and automatic verification of diversity of opinion [30]. As a consequence, SOFN can also be used in reasoning about communicating software agents or boots that are decision-support systems. For example, we can analyze activity of agents that assists clients with their decisions in e-shops, that is, agents which support users of a system in making decisions and choosing the right product.

#### **7.3 Metasets**

The metaset is the new concept of a set with a partial membership relation. It was inspired by the method of forcing [11, 47] in the classical Zermelo-Fraenkel set theory (ZFC) [23, 39]. Nonetheless it is directed towards artificial intelligence applications and efficient computer implementations. Its scope of practical usage is similar to fuzzy sets [57], intuitionistic fuzzy sets [5], or rough sets [45]. There are close relationships between fuzzy set and metaset approaches, described in [50, 55].

Metasets admit standard set-theoretic relations that are valued in a nontrivial Boolean algebra, and therefore enable expressing fractional degrees of membership, equality, subset, and their negations. Algebraic operations for metasets are defined and they satisfy Boolean algebra axioms [54].

Metasets enable the representation and processing of vague imprecise notions and data. Recent development in applications of metasets is focused on decision systems [31–33]. There have been successful attempts to utilize metasets in character recognition problems [49, 51].

Before we discuss the definition of a metaset we review some necessary basic notions and establish a notation.

#### *7.3.1 The Binary Tree* **T** *and the Boolean Algebra* **B**

The binary tree **T** is the set of all finite binary sequences, that is, functions whose domains are finite ordinals, valued in 2 (ω is the set of all finite ordinals)1:

$$\mathbf{T} = \bigcup\_{n \in \omega} \mathbf{2}^n \,. \tag{7.10}$$

<sup>1</sup>For *<sup>n</sup>* <sup>∈</sup> <sup>ω</sup>, let 2*<sup>n</sup>* <sup>=</sup> {*<sup>f</sup>* : *<sup>n</sup>* <sup>→</sup> <sup>2</sup> } denote the set of all functions with the domain *<sup>n</sup>* and the range 2 = { 0, 1 }; they are binary sequences of the length *n*.

The ordering ≤ in the tree **T** (see Fig. 7.4) is the reverse inclusion of functions: for *p*, *q* ∈ **T** such that *p*: *n* → 2 and *q*: *m* → 2, we have *p* ≤ *q* whenever *p* ⊇ *q*; that is, *n* ≥ *m* and *p<sup>m</sup>* = *q*. The root **1**, being the empty function, is the largest element of **T** in this ordering.

Nodes of **T** are sometimes called *conditions*. We denote binary sequences that are elements of **T** using square brackets, for example: [00], [101]. A *level* in **T** is the set of all finite binary sequences with the same length. The set 2*<sup>n</sup>* consisting of all sequences of the same length *n* is the level *n*, denoted by **T***n*. The level 0 consists of the empty sequence **1** only. A *branch C* in **T** is an infinite binary sequence, that is, a function ω → 2. We write *p* ∈ *C* to mark that the binary sequence *p* ∈ **T** is a prefix of the branch *C*.

For the given *p* ∈ **T**the set of all infinite branches containing *p* determines a closedopen set *p*¯ = {*C* ∈ 2<sup>ω</sup> : *p* ∈ *C* } in the Cantor space 2<sup>ω</sup>. The family of all such sets is the closed-open topological basis of this space. Because every clopen set is regular open2 and the family of regular open sets of any topological space forms a complete Boolean algebra, we get the complete algebra B of clopen sets in 2<sup>ω</sup>. The operations of join, meet, and complement correspond to standard set-theoretic operations in this case: union, intersection, and complement. Top and bottom elements are 2<sup>ω</sup> and ∅, respectively.

We use the algebra B to evaluate metaset sentences, particularly to evaluate membership degrees.

#### *7.3.2 General Definition of Metaset*

A metaset is a classical set with a specific structure coding membership degrees of metaset members. The degrees, by construction, are expressed as nodes of the tree **T** but they represent elements of the algebra B.

**Definition 7** A set that is either the empty set ∅ or has the form:

τ = { σ, *p* : σ is a metaset, *p* ∈ **T**}

is called a metaset.

<sup>2</sup>A subset of a space *X* is regular open if it equals the interior of its closure.

Thus the structure we use to encode the degrees of membership is based on ordered pairs. The first element of each pair is the member and the second element is a node of the binary tree that contributes to the membership degree of the first element.

Formally, this is a definition by induction on the well-founded relation ∈. By the axiom of foundation in Zermelo-Fraenkel set theory there are no infinite branches in the recursion as well as there are no cycles. Therefore, no metaset is a member of itself. From the point of view of ZFC a metaset is a particular case of a P-name (see also [39, Chap. VII, Sect. 2] for justification of such type of definition).

For the given metaset τ , the sets:

$$\text{dom}(\tau) = \left\{ \sigma \colon \exists\_{p \in \mathbb{T}} \ \langle \sigma, p \rangle \in \tau \right\}\ \,,\tag{7.11}$$

$$\text{ran}(\tau) = \left\{ p \colon \exists\_{\sigma \in \text{dom}(\tau)} \left< \sigma, p \right> \in \tau \right\} \tag{7.12}$$

are called the *domain* and the *range* of the metaset τ , respectively.

#### *7.3.3 Interpretations of Metasets*

An interpretation of a metaset is a classical crisp set. It is produced from the given metaset with a branch of the binary tree. Different branches determine different interpretations of the given metaset. All of them taken together make up a collection of sets with specific internal dependencies, which represents the source metaset by means of its crisp views.

Properties of sets that are interpretations of the given metaset determine the properties of the metaset itself. In particular we use interpretations to define set-theoretic relations for metasets.

**Definition 8** Let τ be a metaset and let *C* ⊂ **T** be a branch. The set

$$\tau\_{\mathcal{C}} = \{ \sigma\_{\mathcal{C}} \colon \langle \sigma, p \rangle \in \tau \land p \in \mathcal{C} \}$$

is called the interpretation of the metaset τ given by the branch *C*.

The process of producing an interpretation of a metaset consists of two stages, repeated recursively. In the first stage we remove all the ordered pairs whose second elements are nodes that do not belong to the branch *C*. The second stage replaces the remaining pairs – whose second elements lie on the branch *C* – with interpretations of first elements. As the result we obtain a classical set.

*Example 1* Let *p* ∈ **T** and let τ = { ∅, *p* }. If *C* is a branch, then

$$\begin{aligned} p \in C &\to \tau\_C = \{\emptyset\} \,\,, \\ p \notin C &\to \tau\_C = \emptyset \,. \end{aligned}$$

Depending on the branch the metaset τ acquires one of two different interpretations: { ∅ } or ∅. Note that dom(τ ) = { ∅ }.

As we see, a metaset may have multiple different interpretations: each branch in the tree determines one of them. Usually, most of them are pairwise equal, thus the number of different interpretations is much less than the number of branches.

#### *7.3.4 Forcing*

We define and investigate a relation between a condition and a sentence. This relation, called the *forcing* relation, is designed to describe the level of confidence or certainty assigned to the sentence. The level is evaluated by means of conditions in **T** that determine elements of the Boolean algebra B. The root condition **1** specifies the absolute certainty, whereas its descendants represent less certain degrees. The sentences are classical set theory formulas, where free variables are substituted by metasets and bound variables range over the class of metasets.

Given a branch *C*, we may substitute particular metasets in the sample sentence σ ∈ τ with their interpretations that are ordinary sets: σ*<sup>C</sup>* ∈ τ*C*. The resulting sentence is a ZFC sentence expressing some property of the sets τ*<sup>C</sup>* and σ*C*, the membership relation in this case. Such a sentence may be either true or false, depending on τ*<sup>C</sup>* and σ*C*.

For the given metaset τ each condition *p* ∈ **T** specifies a family of interpretations of τ : they are determined by all the branches *C* containing this particular condition *p*. If for each such branch the resulting sentence (after substituting metasets with their interpretations) has constant logical value, then we may think of a conditional truth or falsity of the given sentence, which is qualified by the condition *p*. Therefore, we may consider *p* as the certainty degree for the sentence.

Let Φ be a formula built using the following symbols: variables (*x*<sup>1</sup>, *x*<sup>2</sup>,...), the constant symbol (∅), the relational symbols (∈, =, ⊂), logical connectives (∧, ∨, ¬,→), quantifiers (∀, ∃), and parentheses. If we substitute each free variable *x<sup>i</sup>* (*i* = 1 ... *n*) with some metaset ν*<sup>i</sup>* , and restrict the range of each quantifier to the class of metasets M, then we get as the result the sentence Φ(ν<sup>1</sup>,..., ν*<sup>n</sup>*) of the metaset language that states some property of the metasets ν<sup>1</sup>,..., ν*<sup>n</sup>*. It is called a *metaset sentence*. By the *interpretation* of this sentence, determined by the branch *C*, we understand the sentence Φ(ν<sup>1</sup> *<sup>C</sup>*,..., ν*<sup>n</sup> <sup>C</sup>*) denoted in brief by Φ*C*. The sentence Φ*<sup>C</sup>* is the result of substituting free variables of the formula Φ with the interpretations ν*i <sup>C</sup>* of the metasets ν*<sup>i</sup>* , and restricting the range of bound variables to the universe of all sets **V**. In other words, we replace the metasets in the sentence Φ with their interpretations. The only admissible constant ∅ in Φ as well as in Φ*<sup>C</sup>* denotes the empty set which is the same set in both cases.

**Definition 9** Let *x*<sup>1</sup>, *x*<sup>2</sup>,... *x<sup>n</sup>* all be free variables of the formula Φ and let ν<sup>1</sup>,... ν*<sup>n</sup>* be metasets. We say that the condition *p* ∈ **T** forces the sentence Φ(ν<sup>1</sup>, ν<sup>2</sup>,... ν*<sup>n</sup>*), whenever for each branch *C* ⊂ **T** containing *p*, the sentence Φ(ν<sup>1</sup> *<sup>C</sup>*,... ν*<sup>n</sup> <sup>C</sup>*) is true. We denote the forcing relation with -. Thus,

$$p \Vdash \Phi(\nu^1, \dots, \nu^n) \quad \text{iff} \quad \forall\_{C \subset \mathbf{T}} \left( C \text{ is a branch } \land p \in C \to \Phi(\nu^1\_C, \dots, \nu^n\_C) \right) \; .$$

The key idea behind the forcing relation lies in transferring classical properties from sets onto metasets. Let a property described by a formula Φ(*x*) be satisfied by all sets of form ν*C*, where ν is a metaset and *C* is a branch in **T**. In other words, Φ(ν*C*) holds for all the sets that are interpretations of the metaset ν given by all branches *C* in **T**. Then we might suppose that this property also "holds" for the metaset ν, and we formulate this fact by saying that **1** forces Φ(ν). If Φ(ν*C*) holds only for branches *C* containing some condition *p*, then we might suppose that it "holds to the degree *p*" for the metaset ν; we say that *p* forces Φ(ν) in such a case. Because we try to transfer, or force, satisfiability of some property from classical sets onto metasets, we call this mechanism *forcing*. <sup>3</sup> The next example shows how to transfer the property of being equal onto two specific metasets.

*Example 2* Let τ = { ∅, *p* } and σ = { ∅, *p* · 0,∅, *p* · 1 }, where *p* ∈ **T** and *p* · 0, *p* · 1 denote its children. Let *C* be a branch.

$$\begin{array}{ccccccccc} p \cdot 0 \in \mathcal{C} & \to & \tau\_{\mathcal{C}} = \{\emptyset\} \wedge \sigma\_{\mathcal{C}} = \{\emptyset\} & \to & \tau\_{\mathcal{C}} = \sigma\_{\mathcal{C}} \ , \\ p \cdot 1 \in \mathcal{C} & \to & \tau\_{\mathcal{C}} = \{\emptyset\} \wedge \sigma\_{\mathcal{C}} = \{\emptyset\} & \to & \tau\_{\mathcal{C}} = \sigma\_{\mathcal{C}} \ , \\ p \notin \mathcal{C} & \to & \tau\_{\mathcal{C}} = \emptyset \ \wedge \sigma\_{\mathcal{C}} = \emptyset & \to & \tau\_{\mathcal{C}} = \sigma\_{\mathcal{C}} \ . \end{array}$$

Of course, the last case is possible only when *p* = **1**, because the root of**T**is contained in each branch. As we can see, the interpretations of τ and σ are always pairwise equal, although they are different sets depending on the chosen branch *C*. Analyzing only the structure of τ and σ we may easily conclude that *p* τ = σ. However, because for any branch *C* that does not contain *p* the interpretations of τ and σ are both empty, then also **1** τ = σ.

Thus, for the given metaset sentence Φ, the set of all conditions that force it, { *p* ∈ **T**: *p* - Φ }, determines an element of the Boolean algebra B. We interpret it as the certainty degree for Φ (cf. [55, 56])

**Definition 10** Let Φ be a metaset sentence. The following element of algebra B is called the certainty degree for Φ.

$$|\Phi| = \bigcup \left\{ \mathfrak{b}\_p \in \mathfrak{B} \colon p \Vdash \Phi \right\} \,, \tag{7.13}$$

where b*<sup>p</sup>* is the set of all branches containing *p*.

In other words b*<sup>p</sup>* is the set of infinite binary sequences sharing the common prefix *p*.

<sup>3</sup>This mechanism is similar to, and in fact was inspired by, the method of forcing in classical set theory [11, 12]. It has not much in common with the original, though.

#### *7.3.5 Set-Theoretic Relations for Metasets*

We briefly sketch the methodology behind the definitions of standard set-theoretic relations for metasets. For a detailed discussion of the relations or their evaluation the reader is referred to [54, 55].

**Definition 11** We say that the metaset σ belongs to the metaset τ under the condition *p* ∈ **T**, whenever *p* σ ∈ τ . We use the notation σ ε*<sup>p</sup>* τ .

In other words, σ ε*<sup>p</sup>* τ whenever for each branch *C* containing *p*, it holds σ*<sup>C</sup>* ∈ τ*C*. Formally, we define an infinite number of membership relations: each *p* ∈ **T** specifies another relation ε*p*. Any two metasets may simultaneously be in multiple membership relations qualified by different conditions: σ ε*<sup>p</sup>* τ ∧ σ ε*<sup>q</sup>* τ . Membership under the root condition **1** resembles the full unconditional membership of crisp sets, inasmuch as it is independent of interpretations. By the Definition 10, the membership degree of σ in τ is |σ ∈ τ |. This degree encompasses all the *p* that force the membership; it is the union of elements of B corresponding to these *p*.

The metaset membership admits a hesitancy degree known from the intuitionistic fuzzy sets' field. It is possible that degrees of membership and nonmembership do not sum up to unity. The remaining part is called the hesitancy degree of membership (see [55, 56]). This property has important consequences mentioned in Sect. 7.3.7.

Conditional equality and subset relations for metasets are defined similarly as for a membership.

#### *7.3.6 Applications of Metasets*

The conditional membership reflects the idea that a metaset μ belongs to a metaset τ whenever some conditions are fulfilled. The conditions are represented by nodes of **T** but they relate to elements of algebra B. In applications they refer to a modeled reality and denote some real conditions that justify the statement. Let μ be some individual and let τ be the family of those individuals who are *nice*: they satisfy the property of being *nice*. The sentence μ ε*<sup>p</sup>* τ says that μ is *nice* under the condition *p*, or, in other words, to the degree *p*. The condition *p* itself might be expressed using human language terms, for example: *pretty face* (thus σ is *nice* because of *pretty face*). Labeling conditions with human language terms requires imposing partial ordering on these terms, which is generally rather subjective and not straightforward. We investigated such orderings in a series of papers discussing a new decision-support system based on this idea (see [31–33]).

#### *7.3.7 Classical and Fuzzy Implication*

We may easily define classical implication on the algebra B as follows.

$$
\mathfrak{b} \Rightarrow \mathfrak{c} \equiv \neg \mathfrak{b} \cup \mathfrak{c}, \quad \mathfrak{b}, \mathfrak{c} \in \mathfrak{B} \;. \tag{7.14}
$$

Clearly, it is a fuzzy implication. We may define other fuzzy implications on B too, however, from the point of view of metaset theory we are interested in those that satisfy the following.

$$|\Phi| \Rightarrow |\Psi| \, = \, |\Phi \to \Psi|\,\,. \tag{7.15}$$

Here, Φ and Ψ are metaset sentences and |Φ|, |Ψ| are their corresponding certainty degrees, which are members of B. We would like the implication to commute with the forcing relation that determines certainty degrees for sentences. In other words, we want to have certainty degree of implication Φ → Ψ to be equal to the implication of certainty degrees for sentences Φ and Ψ.

Unfortunately, in the general case (7.15) does not hold. In other words, generally ¬|Φ|∪|Ψ| does not have to be equal |¬Φ ∨ Ψ| and also the border condition *I* (0*L*, 0*L*) = 1*<sup>L</sup>* of definition (6) might not be satisfied. The reason for this is metasets' capability of expressing uncertainty. The value of |Φ| is the measure of certainty, that is, our knowledge about Φ. However, in general, ¬|Φ| is not equal to the certainty degree of ¬Φ, but it is not less and it might also include the hesitancy degree of Φ, just as in intuitionistic fuzzy sets.<sup>4</sup> To exclude the uncertainty issues one has to limit the scope to the class of hereditarily finite metasets. A metaset σ is hereditarily finite when it is a hereditarily finite set: ran(σ) is finite and dom(σ) consists of hereditarily finite metasets only. For such metasets uncertainty vanishes, ¬|Φ| = |¬Φ|, and (7.15) holds (see [55]).<sup>5</sup> The class of hereditarily finite metasets includes metasets representable in machines and it is sufficient for applications. Investigating implication (7.14), which satisfies (7.15), is one of the next goals in the development of metaset theory and related logic of metaset sentences.

#### **7.4 Conclusions and Further Research**

The purpose of this chapter was to present new operators that satisfy the conditions for fuzzy implication in the classical sense [6]. These results emerged from the research conducted by Kosi ´nski, undertaken in his last years of life. They were initiated by investigation of applications of Ordered Fuzzy Numbers, alternatively called Kosi ´nski's fuzzy numbers. Even though the described approaches stem from completely different areas, it turned out that they lead to similar applications and results. Furthermore, they launched a new stream of research that has continued by his coworkers Kacprzak, Starosta, and W¸egrzyn-Wolska after Kosi ´nski's death. The

<sup>4</sup>To prove this fact and consequently, that the equation (7.15) fails in general one has to use examples similar to the ones presented in [50].

<sup>5</sup>The assumption of finiteness of dom(σ) may be dropped to obtain a broader class of finite deeprange metasets (see [55]) for which there is no uncertainty and (7.15) still holds.

applications of the research on OFNs and metasets concern not only approximate reasoning but also decision-support systems and opinion mining [31–33].

In this chapter we discussed two structures for fuzzy implication: the lattice of Step-Ordered Fuzzy Numbers and the Boolean algebra B of membership degrees for metasets. In both of them a fuzzy implication operator (FI) is defined. The implication operator holds center stage in the inference mechanisms of any logic. We can find several different definitions of fuzzy implications in the literature. They play a similar role to Boolean implications that are employed in inference schemes such as modus ponens and modus tollens. However, now reasoning is done with fuzzy statements whose truth values lie in [0, 1] instead of {0, 1}. The most exploited area of applications of fuzzy implications is approximate reasoning, wherein from imprecise inputs and fuzzy premises or rules we can obtain imprecise conclusions.

In the the first part of the chapter the binary Step-Ordered Fuzzy Numbers are explored. As mentioned earlier, Kosi ´nski was looking for new inference schemas and thereby implications based on the orthodox Ordered Fuzzy Numbers (*f* , *g*), where functions *f* and *g* are assumed to be continuous. This question still remains unanswered and studies are in progress. The biggest challenge was to define a negation operator. During the research Kacprzak and Kosi ´nski observed that BSOFN (*f* , *g*), in which functions *f* and *g* are step functions that can return binary values 1 or 0, form a lattice. This property allows us to define the fuzzy implications similar to those proposed by Kleene-Dienes, Zadeh, or Łukasiewicz.

The second part of the chapter focuses on the results obtained by Starosta and Kosi ´nski in the field of metasets. In the algebra B we can also define some fuzzy implication operators analogous to those from classical fuzzy set theory. However, the most important property that we are interested in is the equality of the certainty degree of the sentence Φ → Ψ and the result of applying the operator ⇒ to the certainty degrees of sentences Φ and Ψ. Unfortunately, in the general case, this equality does not hold. Only when we make certain restrictions and limit the scope to the class of hereditarily finite metasets, we get the desired behavior of the operator.

We dedicate future research on fuzzy implications aimed at developing theories and searching for the answers to the questions that are still open to the memory of Professor Kosi ´nski.

#### **References**


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Part III Examples of Applications**

# **Chapter 8 OFN Capital Budgeting Under Uncertainty and Risk**

**Anna Chwastyk and Iwona Pisz**

**Abstract** The aim of this chapter is to propose a new approach to incorporating uncertainty into capital budgeting. The chapter presents methods that can be used by an investor when the decision maker wants to be able to make an investment decision where there are alternative investment projects. This kind of problem is undertaken under the conditions of uncertainty and risk using Ordered Fuzzy Numbers (OFN). The starting point is the concept of Ordered Fuzzy Numbers. The chapter illustrates the implementation of the proposed approach with an example where two alternative investment projects are analyzed. The authors present the capital budgeting problem using a numerical example. The described methods dedicated to investment project selection lay the foundations for a fuzzy decision-making system. We utilize computer software such as MATLAB to demonstrate how the proposed methods can be applied to assessing the profitability of alternative investment projects.

#### **8.1 Introduction**

The capital budgeting problem is concerned with allocation of an organization's capital to a suitable combination of projects (alternative projects) that can bring maximal profit to the organization [12]. In the literature we can find a variety of methods used in capital budgeting (see, e.g., [1, 2, 6, 22]). The main methods are: the net present value method (NPV), profitability index (PI), and internal rate of return (IRR). Based on the literature review we can state that the classical forms of these methods do not take into account the uncertainty and risk which may be inherent in the information used in them. This information includes future cash inflows, cash outflows and available investment capital, the required rate of return of the investment or cost of capital, and the duration of the project [21].

I. Pisz

A. Chwastyk (B)

Opole University of Technology, Prószkowska 76, 45-758 Opole, Poland e-mail: a.chwastyk@po.opole.pl

Opole University, Ozimska 46a, 45-058 Opole, Poland e-mail: ipisz@uni.opole.pl

Traditionally, these investment parameters are assumed as a crisp value. As we know, the capital budgeting problem is accompanied by uncertainty and risk, which, in general, stem from the lack of access to certain data (imprecise data) [11, 21]. In practice, this involves, above all, the inability to predict the behavior of the market during the timeframe of the project's execution, including weather conditions, the level of prices and costs, availability of resources, exchange rates, interest rates, behavior of competition, changes in the demand/supply level for a given product or service, and so on. Therefore several authors began to use fuzzy set theory to help solve the capital budgeting problem in a fuzzy environment. In the literature we can find another approach to capital budgeting, that is, fuzzy capital budgeting. Several authors studied fuzzy set theory and its application in capital budgeting [3, 5, 7, 11, 13, 14, 21]. Some authors indicated certain problems to solve the capital budgeting problem with fuzzy numbers [3, 5, 6, 21].

The notion of Ordered Fuzzy Numbers (OFN) was proposed by Kosi ´nski, Prokopowicz and Sl¸ ´ e˙zak, [20] to eliminate several drawbacks of classical convex fuzzy numbers (CFN) such as the loss of precision increasing with the number of performed operations and the fact that even linear equations cannot be solved in the set of fuzzy numbers. A new fuzzy number does not require any existence of a membership function and can be regarded as an extension of a parametric representation of a fuzzy number.

Ordered Fuzzy Numbers were first used as a tool for a decision- support system concerning financial project evaluation in the paper [18] and the research was continued in [8]. Their idea was based on the determination of the internal rate of return of an investment project in which all expenditures and income were imprecise and vague.

In this chapter we present a capital budgeting problem using OFNs. We continue the research started in the article by [9], which concerned the use of the net present value method to estimate the attractiveness of an investment opportunity. We now modify the method presented in the previous paper by transferring the defuzzification process to another stage of calculations and present the next discount methodsprofitability index and internal rate of return-to make an evaluation of alternative investment projects more precise. We can see that the described methods dedicated to the investment project selection problem lay the foundations for a fuzzy decisionmaking system.

The chapter is organized as follows. In Sect. 8.2 we discuss the concept of fuzzy numbers and Ordered Fuzzy Numbers, which allow modeling using uncertain information. Section 8.3 is dedicated to the investment project's estimation problem. It contains the main definitions of discounted values of cash flows, net present value method, profitability index, and internal rate of return. Section 8.4 presents the authors' approach based on OFNs. In Sect. 8.5 we illustrate the issue on a computational example, demonstrating how the methods can be used for the capital budgeting problem. We utilize a MATLAB environment to demonstrate how the proposed methods can be applied to assess the profitability of an alternative investment project. Final remarks and conclusions are contained in Sect. 8.6.

#### **8.2 Ordered Fuzzy Numbers**

The introduction of the concepts of fuzzy sets and fuzzy numbers was propelled by the need to describe mathematically imprecise and ambiguous phenomena. The above concepts were described in the paper of Lotfi A. Zadeh [26] as a generalization of classical set theory. A fuzzy set *A* in a nonempty space *X* is a set of pairs *A* = {(*x*, μ*A*(*x*)); *x* ∈ *X*}, where μ*A*(*x*) : *X* → [0, 1] is the membership function of a fuzzy set. This function assigns to each element *x* ∈ *X* its membership degree to a fuzzy set.

A fuzzy set, and hence its membership function, has two basic interpretations. It can be understood as a degree to which *x* possesses a certain feature, or as a probability with which a certain, and at this point not entirely known, value will assume a value *x*.

A triangular fuzzy number is denoted with three real numbers [*a*, *b*, *c*], where *a* < *b* < *c*. Its membership function assumes the form:

$$\mu\_A(\mathbf{x}) = \begin{cases} 0 & \text{if} \quad \mathbf{x} \le a; \\ \frac{\mathbf{x} - a}{\mathbf{b} - a} & \text{if} \quad a < \mathbf{x} \le b; \\ \frac{c - \mathbf{x}}{c - b} & \text{if} \quad b < \mathbf{x} \le c; \\ 0 & \text{if} \quad \mathbf{x} > c. \end{cases} \tag{8.1}$$

If an expert generates a triangular fuzzy number as a result of assessing the distribution of possible values of a certain unknown quantity, it means that the expert deems the values below *a*, and above *c*, not possible; whereas the value *b* is possible with a degree of 1, and the remaining values are possible to a varying degree that decreases with their distance from *b*.

The notion of OFN, defined by Kosi ´nski, Prokopowicz, and Sl¸ ´ ezak, was introduced in order to eliminate postulated deficiencies of fuzzy numbers: the loss of precision increasing with the number of performed operations and the fact that even linear equations cannot be solved in the set of fuzzy numbers. The theorem formulated by Kosi ´nski [17] concerning the universal approximation of any nonlinear and continuous defuzzification operator offers tools for the application of OFNs to fuzzy inference and modeling, including assessing the profitability of investment projects. Ordered Fuzzy Numbers give a precise and elegant framework for dealing with fuzzy objects (numbers) and many different methods of defuzzification.

**Definition 1** An Ordered Fuzzy Number *A* is an ordered pair ( *f*, *g*) of continuous functions *f*, *g* : [0, 1] → *R*.

Graphically the curves of ( *f*, *g*) and (*g*, *f* ) do not differ. However, this pair of functions determines different OFNs; they vary in so-called orientation, which is denoted on diagrams by an arrow.

Let *A* = ( *f <sup>A</sup>*, *gA*), *B* = ( *fB*, *gB*), and *C* = ( *fC*, *gC*) be OFNs. Sum *C* = *A* + *B*, product *C* = *A* · *B*, and division *C* = *A* ÷ *B* are defined in the set of OFNs as follows.

$$f\_C(\mathbf{x}) = f\_A(\mathbf{x}) \star f\_B(\mathbf{x}) \text{ and } \ g\_C(\mathbf{x}) = g\_A(\mathbf{x}) \star g\_B(\mathbf{x}),\tag{8.2}$$

where "-" denotes "+", "·", and "÷", respectively. Moreover, *A* ÷ *B* is only defined when *fB*(*x*), *gB*(*x*) = 0 for each *x* ∈ [0, 1]. In the set of OFN, subtraction, exponentiation, and taking a root can also be defined in the usual fashion, for example:

$$(f, \mathbf{g})^n = (f^n, \mathbf{g}^n). \tag{8.3}$$

When considering the set of OFNs and the associated operations of addition and multiplication, we obtain a commutative ring with unity. By augmenting this with scalar multiplication, we obtain a linear space, that is, an algebra over real numbers. Moreover, this set constitutes a commutative Banach algebra with unity in the supremum norm in each of the factors *C*[0, 1] × *C*[0, 1] that are the Banach space. By introducing an appropriate relation of partial order, we also obtain a lattice [8]. We say that an OFN *A* = ( *f*, *g*) is

$$\text{nonnegative if } \quad f(\mathbf{x}) \ge 0 \text{ and } g(\mathbf{x}) \ge 0 \text{ for all } \mathbf{x} \in [0, 1];\tag{8.4}$$

$$\text{positive if } \quad f(\mathbf{x}) > 0 \text{ and } g(\mathbf{x}) > 0 \text{ for all } \mathbf{x} \in [0, 1]. \tag{8.5}$$

Negative OFNs are defined in a similar way.

It is worthwhile to point out that the set of pairs of continuous functions, where one function is increasing and the other is decreasing, and, simultaneously, the increasing function always assumes values lower than the second function, is a subset of the set of OFNs, which represents the class of all convex fuzzy numbers with continuous membership functions [4, 10, 16, 23, 25].

Defuzzification is a process that converts a fuzzy set or a fuzzy number into a crisp value. Functionals, which map a fuzzy number to a real number, play a vital role in OFN applications.

**Definition 2** Let *A* be an OFN and *c* ∈ *R*. A mapping φ from the space of all OFNs to the set of real numbers is called a defuzzification functional if it satisfies the following properties,


where (*c*, *c*) is a pair of constant functions on the interval [0, 1] representing the constant *c*.

Therefore, a defuzzification functional must be homogeneous of order 1, as well as being restrictive, additive, and normalized. The model of constructing defuzzification functionals presented in [19] allows us to obtain a number of defuzzification functionals, whether linear or nonlinear. In this chapter we applied the nonlinear center of gravity defuzzification functional, defined by the following equations.

#### 8 OFN Capital Budgeting Under Uncertainty and Risk 161

$$\phi\_{COG}(f,g) = \begin{cases} \frac{1}{\int\_0^{\frac{1}{\int\_0^s}(f(s)-g(s))ds}}, & \text{when } \int\_0^1 (f(s)-g(s))ds \neq 0\\ \frac{1}{\int\_0^{\frac{1}{\int\_0^s}(s)ds}}, & \text{when } \int\_0^1 (f(s)-g(s))ds = 0. \end{cases} \tag{8.6}$$

#### **8.3 Classic Capital Budgeting Methods**

In economic practice, net present value is the most commonly used discount method. In essence, this method consists in assessing the present value of an investment project based on the forecasted streams of net cash flows, which are the measure of an investor's future benefits. NPV is defined as a sum of net cash flows (NCFs) discounted separately for each year and executed over the entire calculation period, with a constant level of interest (discount) rate. This value expresses the updated (on the day of the assessment) value of benefits, which the undertaking in question can yield in the future. The general form of NPV can be expressed as:

$$NPV = \sum\_{i=0}^{n} \frac{CF\_i}{(1+r)^i},\tag{8.7}$$

where *n* is the number of years, *r* is the market capitalization rate, and *C Fi* is the cash flow in the *i*th year of investment.

NPV allows making an investment decision having analyzed cash flows, reduced by a specific outlay, and discounted by a weighted average cost of capital. Therefore, NPV allows the assessment of the economic value of an undertaking. The employment of a given method requires forecasting future cash flows, which involves forecasting several uncertain variables such as interest rate, prices of resources and services, and exchange rate. It affects the reliability and quality of forecasting future effects and outlay. NPV allows taking the time factor into account. If the net present value of an investment project is positive, the project will contribute to an increase in the value of the company and as a result the wealth of its owners. It is assumed that a given investment is profitable if the value of discounted cash flows during the completion of the investment is positive.

The profitability index (PI), also known as the profit investment ratio (PIR) or value investment ratio (VIR), is the ratio of payoff to investment of a proposed project. It is a useful tool for ranking projects because it allows us to quantify the amount of value created per unit of investment. The profitability index is a ratio of discounted cash inflows to the discounted cash outflows:

$$PI = \frac{\sum\_{i=0}^{n} \frac{CF\_i^+}{(1+r)^{\prime}}}{\sum\_{i=0}^{n} \frac{CF\_i^-}{(1+r)^{\prime}}},\tag{8.8}$$

where *n* is the number of years, *r* is the market capitalization rate, *C F*<sup>+</sup> *<sup>i</sup>* is the cash inflow in the *i*th year of investment, and *C F*<sup>−</sup> *<sup>i</sup>* is the cash outflow in the *i*th year of investment.

The PI helps in ranking investments and deciding the best investment that should be made. A PI greater than one indicates that the present value of future cash inflows from the investment is higher than the initial investment, thereby indicating that it will earn profits. A PI of less than one indicates loss from the investment, and a PI equal to one means that there are no profits. NPV and PI techniques in capital investment decisions are closely related to each other. The PI will be greater than 1 only when the NPV is positive. However, in the case of mutually exclusive proposals having different scales of investment, that is, where the initial investment in the alternative projects is not the same, a conflict in NPV and PI may occur.

Another capital budgeting method is the IRR. This method is described as the discount rate *r* that equates the present value of the expected future net cash inflows with its initial outlay so we have *NPV* = 0. The IRR shows directly the rate of return on the examined projects. The project is cost-effective if its IRR is higher than the limit rate, which is the lowest rate of return acceptable to the investor. Generally, the higher the internal rate of return the investment project has the more profitable the project is [15]. Because of the general problem of finding the roots of the equation *NPV* = 0, there are many numerical methods that can be used to estimate the IRR.

We use the method [24] consisting of several stages. First, we determine the value of the cash flows in subsequent years of an investment. Then, by successive approximations, we select two rates of return *r*<sup>1</sup> and *r*<sup>2</sup> satisfying the conditions:


On the basis of these values we calculate the IRR of the considered project. We apply the following formula for this purpose.

$$IRR = r\_1 + \frac{NPV\_1(r\_2 - r\_1)}{NPV\_1 - NPV\_2}.\tag{8.9}$$

In the presented method of calculating the IRR, the difference between *r*<sup>1</sup> and *r*<sup>2</sup> is particularly important. With the increase in difference between *r*<sup>1</sup> and *r*2, calculation results become less and less accurate as compared to the actual IRR. In practice this difference should be less than one percentage point. In this case, the mistake in calculations of the IRR can be considered to be irrelevant.

#### **8.4 Fuzzy Approach to the Discount Methods**

The classic forms of NPV, PI, and IRR do not take uncertain data into account. When considering the fuzzy environment of an investment project, modifying discount methods to take into account uncertain data becomes necessary. This allows us to take into consideration information uncertainty and decreases the risk of making a mistake in assessing the profitability of an investment project.

For the problem of defining a generalization of the above-mentioned discount methods to OFNs, we assume that the capitalization rate *R*, cash flows *C F*, cash inflows *C F*<sup>+</sup> *<sup>i</sup>* , and cash outflows *C F*<sup>−</sup> *<sup>i</sup>* are Ordered Fuzzy Numbers. The discounted cash flows in the ith year of investment are calculated as follows,

$$\frac{CF\_i}{((1,1)+R)^i},\tag{8.10}$$

where (1, 1) stands for a pair of constant functions that assume a value of one, and + and ÷ signify addition and division in a set of OFNs defined through the Eq. 8.2. Exponentiation is performed according to the formula 8.3. Therefore, we have the formula for ordered fuzzy net present value:

$$OFNPV = \sum\_{i=0}^{n} \frac{CF\_i}{((1,1)+R)^i}.\tag{8.11}$$

And for modified profitability index:

$$OFPI = \frac{\sum\_{i=0}^{n} \frac{CF\_i^+}{((1,1)+R)^\prime}}{\sum\_{i=0}^{n} \frac{CF\_i^-}{((1,1)+R)^\prime}}.\tag{8.12}$$

Our modified method of calculating the internal rate of return requires selection of two ordered fuzzy rates of return *R*<sup>1</sup> and *R*<sup>2</sup> satisfying the following conditions.


On the basis of these values we calculate the ordered fuzzy internal rate of return of the considered project. We use the following formula for this aim,

$$OFFIR = R\_1 + \frac{OF NPV\_1 (R\_2 - R\_1)}{OF NPV\_1 - OF NPV\_2}.\tag{8.13}$$

Before presenting the results of the project evaluation to the investor, the selected defuzzification method should be applied in order to obtain real values:

$$NPV = \phi\_{COG}(OFNPPV), \qquad PI = \phi\_{COG}(OFPI)$$
 
$$\text{and} \quad IRR = \phi\_{COG}(OFIRR).$$

#### **8.5 Computational Example of the Investment Project**

In this section we present an example of a capital budgeting problem using three methods based on OFNs. These methods are: ordered fuzzy net present value method (*OFNPV*), ordered fuzzy profitability index (*OFPI*), and ordered fuzzy internal rate of return (*OFIRR*). We consider an example of potential alternatives of investment project execution: project one *P*<sup>1</sup> and project two *P*2. Investment decisions are made under the conditions of uncertainty and risk, inasmuch as it is impossible to prepare an accurate description of economic and financial conditions for the functioning of the considered projects in the future. The use of OFNs allows us to limit the effects of uncertainty and risk. In order to define the fuzzy conditions of the execution of the investment project, the decision-making process involves an expert who has appropriate knowledge and experience in planning and executing similar projects.

A major problem related to the use of OFNs was the requirement for the experts to give an opinion on individual elements of these alternatives of investment projects in the form of OFNs, that is, pairs of functions. We propose that the expert describe project parameters by means of triangular fuzzy numbers, which will be subsequently converted into OFNs.

We assume that the considered projects are planned for the periods of 7 and 5 years, respectively. The remaining project parameters remain uncertain, therefore they are determined by the expert in the form of triangular fuzzy numbers. The triangular fuzzy capitalization rate assumes the form of *R* = [0.04; 0.06; 0.07]. This means that according to the expert the capitalization rate of below 4% and above 7% is not possible, whereas the value of 6% is the most probable one, and other values are probable to a different degree: the higher they are, the closer they are to 6%. In a similar way, the expert determines the fuzzy values of cash inflows and outflows in subsequent years for project *P*<sup>1</sup> and project *P*2, respectively, in Tables 8.1 and 8.4. In order to simplify the analysis, the data are expressed in thousands of arbitrary monetary units (a.m.u.).

To a triangular fuzzy number *A* = [*a*, *b*, *c*] has a corresponding OFN:

$$A\_{OFF} = ((b-a)\mathbf{x} + a, (b-c)\mathbf{x} + c),\tag{8.14}$$

which is the ordered pair of linear functions (Fig. 8.1).

By applying the formula 8.14 we define OFNs corresponding to the values determined by the expert. For instance, the capitalization rate expressed by OFNs assumes the form: *ROFN* = (0.02*x* + 0.04; −0.01*x* + 0.07). Then we discount cash inflows and outflows using the formula 8.10. Obviously, discounted cash flows in the *i*th


**Table 8.1** Input data for the investment *P*<sup>1</sup> using triangular fuzzy numbers

**Table 8.2** Cash inflows and discounted cash inflows for *P*<sup>1</sup> with the use of OFNs


**Table 8.3** Selected rates of return for the project *P*<sup>1</sup>


year of investment are obtained by adding discounted cash inflows and outflows in the *i*th year of an investment.

Subsequently, based on the formulas presented in the previous point we calculate the indexes OFNPV, OFPI, and OFIRR. Finally, these values undergo defuzzification using the functional 8.6. Thus we obtain crisp values, which can be presented to the investor. Calculations for the considered investment projects were performed using the MATLAB computer program.

Let us consider the alternative investment project *P*1. Table 8.1 presents the cash inflows and outflows of the project using triangular fuzzy numbers defined by the expert engaged in the decision process.


**Table 8.4** Input data for the investment project 2 using triangular fuzzy numbers

Table 8.2 presents the cash inflows for the first project expressed in OFNs. The cash outflows for this project and the cash inflows and outflows for the second project were calculated in an analogous way.

First we calculated the value of *OFNPV* and *OFPI* of the project. After defuzzification, the net present value for project *P*<sup>1</sup> is equal to 47536 a.m.u., which means that the projected earnings generated by the proposed investment exceed the anticipated costs. The profitability index is equal to 1.0962, which further confirms the positive evaluation of the project.

In order to calculate OFIRR for the first project we selected by successive approximations of two rates of return *R*<sup>1</sup> and *R*<sup>2</sup> for which ordered fuzzy net present values are close to ordered fuzzy zero and positive (*R*1) or negative (*R*2), respectively (Table 8.3). The internal rate of return for this project is equal to 8.21%.

Let us consider the alternative investment project *P*2. Table 8.4 presents the cash inflows and outflows of the project using triangular fuzzy numbers.

The NPV for the project *P*<sup>2</sup> is equal to 44397 a.m.u. so the project would be estimated to be a valuable venture. The PI is equal to 1.0987, which further validates the positive evaluation of the project. The internal rate of return for the second project calculated on the data presented in Table 8.5 is equal to 9.78%.

In Table 8.6 we present the results of calculation of the modified discount methods for considered projects *P*<sup>1</sup> and *P*2. We compared the obtained values of the proposed new methods to aid the decision maker in choosing the best investment project. First we determined the NPV for each project; then we established the profitability index


**Table 8.5** Selected rates of return for the project *P*<sup>2</sup>

**Table 8.6** Summarized results of proposed discount methods for the projects


for each investment project, and finally the internal rates of return. According to the NPV analysis alone, project *P*<sup>1</sup> is the most appropriate choice for the decision maker. The profitability indexes for project *P*<sup>1</sup> and project *P*<sup>2</sup> vary slightly and they are greater than 1, which confirms the profitability of both projects. According to the IRR analysis alone, project *P*<sup>2</sup> is the most appropriate choice for the decision maker. The NPV and IRR analysis for these two projects give us conflicting results. This is due to the timing of the cash flows for each project as well as the size difference between the two projects. By the NPV rule the decision maker should choose project P1, so it can be executed. The convention is to use the NPV rule when the two methods are inconsistent. It better reflects the primary goal: to improve the financial wealth of the company.

#### **8.6 Summary**

The capital budgeting problem with Ordered Fuzzy Numbers corresponds to the project selection problem. We modified the method presented in our previous paper by transferring the defuzzification process to another stage of calculations and we presented the next discount methods, the profitability index and internal rate of return, to make an evaluation of alternative investment projects more precise. Tools of that kind can be perceived as a decision-support system based on OFNs. We presented the example of alternative investment project selection using new discount methods. The presented methods may be used to represent imprecise information, among others about cash flows and capitalization rate. They offer a clear simultaneous representation of several pieces of information. In addition, well-defined arithmetic operations on OFNs make it easy to perform even complex calculations connected, for example, with a long period of investment. Moreover, owing to the elimination of issues related to using classical fuzzy numbers such as increasing fuzziness over subsequent operations, impossibility to solve equations, or high computational complexity, the OFN model may prove to be good tool for economic analysis. It allows modeling the uncertainty associated with financial data and constructing a full decision-support system in the future.

## **References**


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Chapter 9 Input-Output Model Based on Ordered Fuzzy Numbers**

**Dariusz Kacprzak**

**Abstract** The chapter presents the application of Ordered Fuzzy Numbers (OFNs) to the economic model. These numbers are used for input-output analysis (the Leontief model), which is a basic method of quantitative economics that presents macroeconomic activity as a system of interrelated goods and services. OFNs allow us not only to apply mathematical modeling of imprecise or ambiguous data but also simultaneously portray more information than could be presented by real numbers. It is shown based on the Leontief model, where at the same time the current level, the forecast level, and the level of change of the final demand or the production level can be determined. The example shows that use of OFNs in economic modeling can simplify and deepen the economic analyses.

## **9.1 Introduction**

Economics is a social science that studies and analyzes the production, distribution, and consumption of goods and services. One of the main tools used in economics is model. A model is a theoretical construction representing economic processes by a set of variables and a set of logical and quantitative relationships between them. Such model often take the form of systems of linear equations, due to their simplicity and ease of interpretation of their parameters and solution. One of the most famous and popular models of this type is the Leontief model, often called input-output analysis.

Input-output analysis is a quantitative economic technique that represents interdependencies between different sectors (industries, branches) and a way of describing the allocation of resources of a national economy or different regional economies. It is a particularly effective tool for the optimization of production processes, the improvement of economic conditions, and cost allocation analysis. The input-output

D. Kacprzak (B)

© The Author(s) 2017

This work was supported by Bialystok University of Technology grant S/WI/1/2016

Faculty of Computer Science, Department of Mathematics, Bialystok University of Technology, Wiejska 45A, 15-351 Bialystok, Poland e-mail: d.kacprzak@pb.edu.pl

P. Prokopowicz et al. (eds.), *Theory and Applications of Ordered Fuzzy Numbers*, Studies in Fuzziness and Soft Computing 356, DOI 10.1007/978-3-319-59614-3\_9

analysis also shows the combination of resources (raw materials, labor, capital), called inputs, that are required to achieve desired production goals, called outputs. It makes the Leontief model play a central role in planning and forecasting in economics.

The model proposed by Leontief does not take into account the natural uncertainty of variables of such complicated mathematical descriptions as the real-world economy models. The application of these variables in models involves knowing their numerical values. However, in reality many economic variables are difficult to be precisely measured. The elements of the Leontief model, such as a technical coefficients matrix, an output matrix, or a final demand matrix, are usually known as some intervals or fuzzy numbers. The use of only mean values in these matrices can lead to the loss of valuable information. In other words, in practical applications parameters are described using not only single values but intervals and fuzzy sets and numbers, in particular Ordered Fuzzy Numbers (OFNs). Properties of operations and the possibility of different interpretations of OFNs make these numbers widely used in economics.

There are papers in the literature in which the OFNs model is used in economic models. This model was applied, among others, to support decision making [9, 10, 14], for presentation of revenues and costs of a company [2, 3, 7], in the Leontief model [1, 2], for the presentation of stock prices [4, 8, 13], for the presentation of prices and the dynamics of their changes [5], and to determine the economic size of the delivery [6, 11]. These applications are based on the orientation of the OFNs as additional information and the arithmetics of the OFNs similar to the arithmetics of real numbers.

The chapter is organized as follows. Section 9.2 describes the fundamental concepts of input-output analysis. Next, in Sect. 9.3 a numerical example of input-output analysis based on OFNs is presented. Finally, concluding remarks are provided in Sect. 9.4.

#### **9.2 Input-Output Analysis**

The American economist Wassily W. Leontief developed the economic input-output model (the term "intersectoral" analysis is also used), which was first published in 1936. The beginnings of input-output analysis in economics are most often credited to Leontief and others who wrote the paper, "Studies in the Structure of the American Economy" [12]. In 1973 Leontief was awarded a Nobel prize for his great achievements in economics. The prize motivation was: "For the development of the input-output method and for its application to important economic problems." His model is a basis for more models currently being used in many parts of the world. It can be applied to an economy of any size, from a small business or a region, to a whole country or the whole world. The Leontief input-output model leads to a better understanding of modeling economic systems, because it describes how the input and output of different sectors affect each other. The main goal of the Leontief input-output model is to balance (equilibrium) the total amount of goods produced (total output) to the total demand (total input and final demand) for that production, in other words, consumption equals production.

Because the input-output model normally encompasses a large number of sectors, its framework is quite complicated. To simplify the analysis (model), the following assumptions are adopted:


In general, let us suppose an economy has *n* sectors. The output of any sector, say the *i*th sector, is needed as an input in many other sectors, or even for that sector itself. It means that the level of the output of the *i*th sector will depend on the input requirements of all the *n* sectors. On the other hand, the output of many other sectors will enter an input into the *i*th sector, and consequently the levels of other sectors products will depend partly on the input requirements of the *i*th sector. In view of these intersectoral dependences, it is clear that the input-output analysis should be of great use in production planning. This leads to the fact that the Leontief model allows answering the question: "What output level should reach each of the *n* sectors in an economy in order to satisfy the total demand for that product?" To present the input-output model the following designations are introduced (they are expressed in financial terms, for example, in millions of dollars):


A starting point for an input-output analysis is an input-output table. An inputoutput table is a description of the flows (relationships) of goods and services among different sectors of a particular economic system. In the table, each horizontal row describes how one sector's total product is divided among various sectors and final consumption. In turn, each vertical column denotes the combination of productive resources used within one sector. These flows concern a particular period, usually a one-year period. Table 9.1 shows a representation of an input-output table.

The structure of the table is a matrix that lists economic sectors, in the same sequence, both vertically and horizontally. If the rows of Table 9.1 are considered, for each *i*th sector (*i* = 1, ..., *n*), a linear equation describing how the sector distributes an output to other sectors can be written as


**Table 9.1** An input-output table

$$\begin{cases} X\_1 = \mathbf{x}\_{11} + \mathbf{x}\_{12} + \dots + \mathbf{x}\_{1n} + d\_1\\ X\_2 = \mathbf{x}\_{21} + \mathbf{x}\_{22} + \dots + \mathbf{x}\_{2n} + d\_2\\ \dots + \dots + \dots + \dots + \dots + \dots \dots \\ X\_n = \mathbf{x}\_{n1} + \mathbf{x}\_{n2} + \dots + \mathbf{x}\_{nn} + d\_n \end{cases} \tag{9.1}$$

From the assumptions of the model: in order to produce each unit of the product of the *j*th sector, the input needed for the product of the *i*th sector must be a fixed amount, which should be denoted by *ai j* belonging to [0, 1). Each element *ai j* is named the input coefficient or the technological coefficient and is calculated as

$$a\_{ij} = \frac{\chi\_{ij}}{X\_j} \quad (i, j = 1, \ldots n). \tag{9.2}$$

The coefficients *ai j* are fixed by the current technology (when technology changes, coefficients change as well). From the formula (9.2)

$$x\_{ij} = a\_{ij} X\_j \quad (i, j = 1, \ldots n) \tag{9.3}$$

where elements *ai j X <sup>j</sup>* for *j* = 1, ..., *n* are the inputs demand of the *j*th sector. If Eq. (9.3) are put into (9.1), a linear system of Eq. (9.1) takes the form

$$\begin{cases} X\_1 = a\_{11}X\_1 + a\_{12}X\_2 + \dots + a\_{1n}X\_n + d\_1\\ X\_2 = a\_{21}X\_1 + a\_{22}X\_2 + \dots + a\_{2n}X\_n + d\_2\\ \dots + \dots + \dots + \dots + \dots + \dots - \dots - \dots \\ X\_n = a\_{n1}X\_1 + a\_{n2}X\_2 + \dots + a\_{nn}X\_n + d\_n \end{cases} \tag{9.4}$$

or, following application of a matrix algebra, it can be written as

$$
\begin{pmatrix} X\_1 \\ X\_2 \\ \dots \\ X\_n \end{pmatrix} = \begin{pmatrix} a\_{11} \ a\_{12} \ \dots \ a\_{1n} \\ a\_{21} \ a\_{22} \ \dots \ a\_{2n} \\ \dots \\ a\_{n1} \ a\_{n2} \ \dots \ a\_{nn} \end{pmatrix} \begin{pmatrix} X\_1 \\ X\_2 \\ \dots \\ X\_n \end{pmatrix} + \begin{pmatrix} d\_1 \\ d\_2 \\ \dots \\ d\_n \end{pmatrix} \tag{9.5}
$$

or in short

$$X = AX + d\tag{9.6}$$

where *X* denotes the output matrix, *A* is the matrix of technological coefficients, and *d* is the final demand matrix.

Very interesting from an economic point of view is matrix *A*, in which each column determines the input requirements for the production of one unit of a particular sector. This means that the production of each unit of the product of the *j*th sector requires *a*<sup>1</sup> *<sup>j</sup>* unit of the product of the first sector, *a*<sup>2</sup> *<sup>j</sup>* unit of the product of the second sector,..., and *anj* unit of the product of the *n*th sector. Because of the presence of the open sector, the sum of the elements in each column of the input coefficient matrix *A* must be less than 1. If this sum is greater than or equal to 1, production is not economically justifiable.

Equation (9.6) can be written in the form of the Leontief model (*I* denotes a unit matrix of size *n*)

$$X - AX = d \quad \Longleftrightarrow \quad (I - A)X = d. \tag{9.7}$$

The matrix (*I* − *A*) is called the Leontief matrix and converts a total production vector *X* into a final product vector *d*. The question appears immediately: "If the final product vector *d* is given, can the situation be reversed and can the total production vector *X* be determined?" To answer the question the concept of a productive matrix should be introduced. A matrix of input coefficients *A* is productive if there is a nonnegative vector of total production *X* (i.e., all its entries are nonnegative, for each *i* element *xi* ≥ 0), such that *X* > *AX*. The condition *X* > *AX* has a simple economic interpretation. If *A* is a productive matrix, the *i*th element of the vector *AX* is the total production value of all sectors used by the *i*th sector in a year. Hence, the condition *X* > *AX* means that, for each *i*, the value of the product produced by the *i*th sector exceeds the value of the products used by the *i*th sector. In other words, each sector runs at a profit.

**Theorem 1** *Let A be a square and a nonnegative matrix. Then* (*I* − *A*) *is invertible and* (*I* − *A*)−<sup>1</sup> *nonnegative, if and only if the matrix A is productive.*

One can notice from the above theorem that in the real economy the final product *d* determines the total production *X*, according to the rule

$$X = (I - A)^{-1}d.\tag{9.8}$$

If the symbol Δ is used, for example, Δ*X*, to indicate a change in the value of a variable *X*, the change in the size of one variable due to changes in a second one using the Leontief model can be determined. The effect in the value of the final product, determined by changes in the total production value can be calculated using the equation in the following form

$$(I - A)\Delta X = \Delta d\tag{9.9}$$

or the change in total production due to the changes in the final product, using the equation in the form

$$
\Delta X = (I - A)^{-1} \Delta d.\tag{9.10}
$$

The Leontief model is used for forecasting. Three types of forecasts can be distinguished:


#### **9.3 Example of Application of OFNs in the Leontief Model**

The nature of the input-output analysis makes it possible to analyze an economy as an interconnected system of sectors that directly and indirectly affect one another. The Leontief model can be used, among others, to analyze how changes in the production level of different sectors affect changes in the final demand. More precisely, this model can be used to determine the final demand when production levels of different sectors are known, using the formula (9.7) or to analyze how changes in the production level of different sectors affect changes in the final demand, using the formula (9.9).

The use of OFNs allows us simultaneously to take into account the formulas (9.7) and (9.9). For this purpose, the triangular OFNs of the form *X* = ( *fX* (0), *fX* (1), *gX* (1), *gX* (0)), where *fX* (1) = *gX* (1), is used with the following interpretation. The real number *fX* (0) denotes the current production level, whereas the real number *gX* (0) denotes the forecasted production level. Then the orientation of the OFN informs us about the direction of a change, that is, it describes the economic situation of the sector. More precisely, if *fX* (0) < *gX* (0) then the expected economic situation of the sector is good and the production level of the sector increases. Otherwise, that is, when *fX* (0) > *gX* (0) then the economic situation of the sector deteriorates and the production level is reduced. When *fX* (0) = *gX* (0) then there are no economic reasons to change the production level.

Let us consider a hypothetical economy consisting of only three sectors. The input-output table of this economy is presented in Table 9.2.

Using formula (9.2), the matrix *A* of the technological coefficients can be calculated and takes the form

$$A = \begin{pmatrix} 0.1 \ 0.2 \ 0.1 \\ 0.2 \ 0.4 \ 0.2 \\ 0.3 \ 0.1 \ 0.4 \end{pmatrix}.$$


**Table 9.2** The input-output table of a hypothetical economy

The Leontief matrix (*I* − *A*)that allows calculating the final demand of the economy takes the form

$$I - A = \begin{pmatrix} 0.9 \ -0.2 \ -0.1 \\ -0.2 \ 0.6 \ -0.2 \\ -0.3 \ -0.1 \ 0.6 \end{pmatrix}.$$

We consider how changes in the production level of different sectors affect changes in the final demand of each sector. For the particular sector, depending on the economic situation, three cases are analyzed: no change, and increase or decrease of the production level. Obtained results are presented in Tables 9.3 and 9.4, where *X* is the production vector, *d* is the final demand vector, Δ*X* is the change of production level vector (i.e., *fX* (0) − *gX* (0) where the sign determines the direction of change ((+) increase and (−) decrease), and Δ*d* is the change of the final demand vector (i.e., *fd* (0) − *gd* (0) where the sign determines the direction of change ((+) increase and (−) decrease).

Let us consider line 1 of Table 9.3. It shows the economy is stable and there are no causes influencing changes in the production level. The production level of each sector in the current *Xc* and forecasted *X <sup>f</sup>* periods are the same and equal to *Xc* = *X <sup>f</sup>* = (1400 1600 1800)*<sup>T</sup>* . It means that there are no causes to change the final demand level and in the current *dc* and forecasted *d <sup>f</sup>* periods it is equal to *dc* = *d <sup>f</sup>* = (760 320 500)*<sup>T</sup>* .

Line 2 of Table 9.3 shows the situation in which the first sector has a good economic situation and intends to increase the production level from 1400 to 1500, whereas the other sectors have a stable situation and their production levels do not change. The use of OFNs in the Leontief model allows us to compute, for the current production level equal to *Xc* = (1400 1600 1800)*<sup>T</sup>* , the final demand equal to *dc* = (760 320 500)*<sup>T</sup>* . These numbers also allow us to compute the final demand equal to *d <sup>f</sup>* = (850 300 470)*<sup>T</sup>* after increasing the production level of the first sector equal to *X <sup>f</sup>* = (1500 1600 1800)*<sup>T</sup>* . This means the increase of the production level of the first sector of 100 units and the unchanged production level of other sectors (described by the vector Δ*X* = (100 0 0)*<sup>T</sup>* ) cause changes in the final demand from *dc* = (760 320 500)*<sup>T</sup>* to *d <sup>f</sup>* = (850 300 470)*<sup>T</sup>* (described by the vector Δ*d* = (90 − 20 − 30)*<sup>T</sup>* ). Changes in the final demands of the sectors result from the following facts.

• Increasing the production level of the first sector and the unchanged production level of other sectors causes the increase of the final demand of the first sector.


**Table 9.3** Production vector *X* described by OFNs and the calculated final demand vector *d* and the change vectors Δ*X* and Δ*d*


**Table 9.4** Production vector *X* described by OFNs and the calculated final demand vector *d* and the change vectors Δ*X* and Δ*d*

• On the other hand, other sectors, in response to the increasing demand of the first sector, transfer to the first sector a greater amount of their production, which causes a decrease in their final demand.

Line 3 of Table 9.3 shows the situation in which the first sector has a bad economic situation and intends to decrease the production level from 1400 to 1300, whereas other sectors have a stable situation and their production levels do not change. In this situation, the results are symmetrical (opposite) to those shown in line 2 of Table 9.3.

Lines 4–7 of Table 9.3 show the situation in which any sector (second or third one), under the influence of the economic situation, changes the production level, whereas the production levels of other sectors are not changed. Economic interpretation of the situation of the hypothetical economy is analogous to that presented above.

Now, let us compare the state of the economy presented in lines 2 and 8 of Table 9.3. In line 8, in comparison to line 2, the second sector also has a good economic situation and intends to increase the production level from 1600 to 1700. In this situation, for the current production level equal to *Xc* = (1400 1600 1800)*<sup>T</sup>* the final demand, equal to *dc* = (760 320 500)*<sup>T</sup>* can be computed. Moreover the final demand, equal to *d <sup>f</sup>* = (830 360 460)*<sup>T</sup>* after increasing the production level of the first and second sectors of 100 units is determined. These results mean that the increase of the production level of the first and second sectors of 100 units and the unchanged production of the third sector (described by the vector Δ*X* = (100 100 0)*<sup>T</sup>* ) cause changes in the final demand from *dc* = (760 320 500)*<sup>T</sup>* to *d <sup>f</sup>* = (830 360 460)*<sup>T</sup>* (described by the vector Δ*d* = (70 40 − 40)*<sup>T</sup>* ). Changes in the final demands of the sectors result from the following facts (in comparison to line 2).


Lines 9–14 of Table 9.3 and lines 1–13 of Table 9.4 present situations in which the production level of sectors of the economy increases, decreases, or remains unchanged, and how it affects the final demand of these sectors. These lines show and allow us to observe the current and future final demands of the sectors and how the final demands change as a result of changes in the production levels of the sectors.

A similar analysis can be carried out knowing the final demand vector *d* (or Δ*d*) and calculating the production levels of the sectors *X* (or Δ*X*) of the economy using matrix

$$(I - A)^{-1} = \begin{pmatrix} 1.\text{36 } 0.52 \text{ 0.40} \\ 0.72 \text{ 2.04 } 0.80 \\ 0.80 \text{ 0.60 } 2.00 \end{pmatrix}$$

and formulas (9.8) and (9.10).

#### **9.4 Conclusions**

The chapter presented the concept of an application of Ordered Fuzzy Numbers in an economical model, called the Leontief model. These numbers also allow us to present more information than real numbers. It is shown, based on the Leontief model, where OFNs simultaneously described the current levels, forecast levels, and the levels of change, both with regard to the final demand and the production level. It makes the OFNs model a very useful tool for mathematical modeling in economics.

#### **References**


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Chapter 10 Ordered Fuzzy Candlesticks**

**Adam Marszałek and Tadeusz Burczy´nski**

**Abstract** The purpose of this chapter is to present how Ordered Fuzzy Numbers (OFNs) can be used with financial high-frequency time series. Considering this approach the financial data are modeled using OFNs called further ordered fuzzy candlesticks. Their use allows modeling uncertainty associated with financial data and maintaining more information about price movement at an assumed time interval than compared to commonly used price charts (e.g., Japanese Candlestick chart). Furthermore, in a simple way, it is possible to include the information about volume and the bid-ask spread. Thanks to the well-defined arithmetic of OFNs, one can be used in technical analysis or to construct models of fuzzy time series in the form of classical equations. Examples of an ordered fuzzy moving average indicator and ordered fuzzy autoregressive process are presented.

#### **10.1 Introduction**

High-frequency financial data are observations on financial variables such as quotations of shares, futures, or currency pairs, quoted daily or at a finer timescale. Data containing the most complete knowledge about quotations of the financial instrument are prices corresponding to each single transaction made on this instrument. They are at the same time the data of the highest possible frequency called ultra-highfrequency data or simply tick-by-tick data.

High-frequency financial data possess unique features absent in data measured at lower frequencies, and analysis of these data poses interesting and unique

A. Marszałek (B) · T. Burczy ´nski

Institute of Computer Science, Computational Intelligence Department, Cracow University of Technology, Warszawska 24, 31-155 Cracow, Poland e-mail: amarszalek@pk.edu.pl

T. Burczy ´nski e-mail: tburczynski@ippt.pan.pl

T. Burczy ´nski Institute of Fundamental Technological Research, Polish Academy of Sciences, Pawinskiego 5B, 02-106 Warsaw, Poland

challenges to econometric modeling and statistical analysis [16]. Analysis of tickby-tick data is very difficult, among others, due to the very large number of observations, irregular spacing between observations, occurrence price patterns, and longlived dependencies. For various reasons, high-frequency data may contain erroneous observations, data gaps, and even disordered sequences. Moreover, Lo and Mackinlay consider that the financial market is a complex, nonstationary, noisy, chaotic, and dynamic system but it does not follow a random walk [7]. The main reason is that a huge amount of information is reflected in the financial market. The main factors include an economic condition, political situation, traders' expectations, catastrophes, and other unexpected events. Thus one can conclude that stock market data should be considered in the framework of uncertainties.

Making investment decisions based on observation of each single quotation is very difficult or even impossible. Therefore a large part of investors very often use price chart analysis to make decisions. The price charts (e.g., the Japanese Candlestick chart) are used to illustrate movements in the price of a financial instrument over time. Note that in using the price chart, a large part of the information about the process is lost; for example, using the Japanese Candlestick chart with daily frequency, for one day, we know only four prices (i.e., open, low, high, and close), while in this time the price has changed hundreds of times. In spite of this, Japanese Candlestick charting techniques are very popular among traders and allow for achieving more than average profits. More details about the Japanese Candlesticks and trading techniques based on them can be found in [12].

In our previous papers [8–10] we showed how we can use fuzzy logic, that is, Ordered Fuzzy Numbers (OFNs) defined in Chap. 4 (see also [1–3, 5, 13, 14]), to model uncertainty associated with financial data and to keep more information about price movement. The idea, construction methods, and an example of an application of ordered Fuzzy Candlesticks are specifically recalled in this work. In addition some new concepts are also presented.

#### **10.2 Ordered Fuzzy Candlesticks**

Generally, in our approach, a fixed time interval of financial high frequency data is identified with Ordered Fuzzy Numbers and it is called ordered Fuzzy Candlestick (OFC). The general idea is presented in Fig. 10.1. Note that the orientation of the OFN shows whether the ordered Fuzzy Candlestick is long or short. Information about movements in the price are contained in the shape of the *f* and *g* functions. In this sense, functions *f* and *g* do not depend directly on the variable tick but depend on the relationship between the parameters *A* and *B*. In the following sections the details of constructing the ordered Fuzzy Candlestick are presented.

Previous works listed two cases of construction of ordered Fuzzy Candlesticks. The first assumes that the functions *f* and *g* are functions of predetermined type; moreover, the shapes of these functions should depend on two parameters (e.g.,

**Fig. 10.1** Draft of general concept of ordered Fuzzy Candlestick

linear). Then the ordered Fuzzy Candlestick for a given time series can be defined as follows.

**Definition 1** Let {*Xt* : *t* ∈ *T* } be a given time series and *T* = {1, 2,..., *n*}. The ordered Fuzzy Candlestick is defined as an OFN *C* = ( *f*, *g*) that satisfies the following conditions 1–4 (for a long candlestick) or 1 –4 (for a short candlestick).


In the above conditions the ordered Fuzzy Candlestick center (i.e., added interval) is designated by parameters *S*1, *S*<sup>2</sup> ∈ [min*<sup>t</sup>*∈*<sup>T</sup> Xt*, max*<sup>t</sup>*∈*<sup>T</sup> Xt*] and can be computed as different kinds of averages (e.g., arithmetic, weighted, or exponential). *C*<sup>1</sup> and *C*<sup>2</sup> are arbitrary nonnegative real numbers that further extend the support of fuzzy numbers and can be computed, for example, as the standard deviation or volatility of *Xt* . The parameters *A* and *B* are positive real numbers that determine the relationship between the functions *f* and *g*. They can be calculated as the mass of the desired area with the assumed density (see Fig. 10.1). Numbers *Ff* and *Fg* are the fields under the graph of functions *f* <sup>−</sup><sup>1</sup> and *g*−1, respectively.

#### *Example 1* Trapezoid OFC

Suppose that *f* and *g* are linear functions in the form:

$$\mathbf{f}(\mathbf{x}) = \left(b\_f - a\_f\right)\mathbf{x} + a\_f \quad \text{and} \quad \mathbf{g}(\mathbf{x}) = \left(b\_\mathbf{g} - a\_\mathbf{g}\right)\mathbf{x} + a\_\mathbf{g} \tag{10.1}$$

then the ordered Fuzzy Candlestick *C* = ( *f*, *g*) is called a *trapezoid OFC*, especially if *S*<sup>1</sup> = *S*<sup>2</sup> where it can also be called a *triangular OFC*.

#### *Example 2* Gaussian OFC

The ordered Fuzzy Candlestick *C* = ( *f*, *g*) where the membership relation has a shape similar to the Gaussian function is called a *Gaussian OFC*. It means that *f* and *g* are given by functions:

$$f(\mathbf{x}) = f(\mathbf{z}) = \sigma\_f \sqrt{-2\ln(\mathbf{z})} + m\_f \quad \text{and} \quad \mathbf{g}(\mathbf{x}) = \mathbf{g}(\mathbf{z}) = \sigma\_\mathbf{g} \sqrt{-2\ln(\mathbf{z})} + m\_\mathbf{g} \tag{10.2}$$

where, for example, *z* = 0.99*x* + 0.01.

The procedure of determining the parameters of the function *f* and *g* is shown in Algorithm 1 and the examples of realizations of trapezoid and Gaussian ordered Fuzzy Candlesticks are presented in Fig. 10.2.


**Fig. 10.2** Examples of trapezoid and Gaussian OFC

The second case of construction of ordered Fuzzy Candlesticks assumes that the functions *f* and *g* are defined in a similar way to the empirical distribution in the statistical sciences and called an *empirical OFC*. The calculation procedure of an empirical OFC is shown in Algorithm 2, whereas the example of realizations is presented in Fig. 10.3.


**Fig. 10.3** Example of empirical OFC

### **10.3 Volume and Spread**

#### *10.3.1 Volume*

In technical analysis the prices are by far the most important. However, another piece of important information about price movement is volume. Volume is the number of entities traded during the time period under study. It is used to confirm trends and chart patterns. Any price movement up or down with relatively high volume is seen as a stronger, more relevant move than a similar move with weak volume [11].

In the case of ordered Fuzzy Candlesticks, adding extra information about volume is very easy, enough to calculate the parameters *A* and *B* using the density associated with volume or for empirical OFC, and enough to calculate the empirical distribution using prices repeated by volume times. The example of ordered Fuzzy Candlesticks without and with volume information are presented in Fig. 10.4.

#### *10.3.2 Spread*

A spread (bid-ask spread) is simply defined as the price difference between the highest price that a buyer is willing to pay (bid price) for an asset and the lowest price that a seller is willing to accept to sell it (ask price). It is important to remember that spreads are variable, meaning they will not always remain the same and will change sporadically. These changes are based on liquidity, which may differ based on market conditions and upcoming economic data. In an over-the-counter market, dealers act as market makers by quoting prices at which they will buy and sell a security or currency. In this case, the spread represents the potential profit that the

**Fig. 10.4** Example of Gaussian OFC without and with volume information

**Fig. 10.5** Example of Gaussian OFC without and with spread information

market maker can make from this activity, and it's meant to compensate it for the risk of market making. On the other hand, it is a cost for traders.

In the case of ordered Fuzzy Candlesticks, it is possible to add extra information about the bid-ask spread by calculating the parameters *S*1, *C*<sup>1</sup> and *S*2, *C*2, using the bid price and ask price, respectively. The examples of ordered Fuzzy Candlesticks without and with spread information are presented in Fig. 10.5.

**Fig. 10.6** The daily Japanese Candlestick chart of the dataset with realization of a classical and ordered fuzzy simple moving average

#### **10.4 Ordered Fuzzy Candlesticks in Technical Analysis**

#### *10.4.1 Ordered Fuzzy Technical Analysis Indicators*

Ordered Fuzzy Candlesticks are Ordered Fuzzy Numbers, hence, thanks to their welldefined arithmetic [1, 4, 13] can be used to construct a fuzzy version of technical analysis indicators such as the simple moving average.

The classical simple moving average (SMA) with order *s* at a time period *t* is given by formula

$$SMA\_t(\mathbf{s}) = \frac{1}{s} \left( X\_t + X\_{t-1} + \dots + X\_{t-s+1} \right) \tag{10.3}$$

where *Xt* is the observation (real) at a time period *t* (e.g., closing prices).

Now, the ordered fuzzy simple moving average (OFSMA) with order *s* at a time period *t* is also given by formula (10.3) but the observations *Xt* are OFC at a time period *t*. Figure 10.6 shows the results of realization of classical (line with xcross symbol) and ordered fuzzy (triangle symbols) simple moving average with order equal to 14 for the dataset covering the period of 80 days from 02-03-2016 till 02-06- 2016 of quotations of EUR/PLN. Figure 10.6 also shows the ordered fuzzy simple moving average defuzzification by the center of gravity operator (line with circle symbol). In technical analysis the moving average indicator usually is used to define the current trend. Notice that the ordered fuzzy moving average determines the current trend by orientation of the ordered Fuzzy Candlesticks: if orientation is positive then then the trend is long, else the trend is short. The process of fuzzification of the other technical indicators can be done by analogy.

**Fig. 10.7** Empirical ordered Fuzzy Candlesticks as technical indicator

## *10.4.2 Ordered Fuzzy Candlestick as Technical Analysis Indicator*

The method of construction of ordered Fuzzy Candlesticks can be used directly as a technical analysis indicator by doing the calculation of OFC over a moving window of observations (ticks). The size of the window can be defined as the number of observations (e.g., last 100 ticks) or the time (e.g., last 10 min). Figure 10.7 shows the results of realization of empirical ordered Fuzzy Candlesticks as a technical indicator with window size equal to 15 min for the dataset covering the period of 1 hour from 3 PM till 4 PM of 02-06-2016 of quotations of EUR/PLN.

Indicators are used as a secondary measure to the actual price movements and add additional information to the analysis of securities. Indicators are used in two main ways: to confirm price movement and the quality of chart patterns, and to form buy and sell signals. The most common type of indicators is called oscillators and they fall in a bounded range. Oscillator indicators have a range, for example, between zero and 100, and signal periods where the security is overbought (near 100) or oversold (near zero). In a simple way the indicator based on ordered Fuzzy Candlesticks can be presented in the form of an oscillator by applying normalization. An example of empirical ordered Fuzzy Candlesticks as an oscillator indicator is presented in Fig. 10.8.

#### **10.5 Ordered Fuzzy Time Series Models**

Thanks to the well-defined arithmetic of OFNs, it is possible to construct models of fuzzy time series, such as an autoregressive process (AR), where all input values are OFC, and the coefficients and output values are arbitrary OFNs, in the form of classical equations, without using rule-based systems.

**Fig. 10.8** Empirical ordered Fuzzy Candlesticks as oscillator indicator

The classical autoregressive model (AR(*p*)) is one where the current value of a variable, depends only upon the values that the variable took in previous periods plus an error term [15]. In the presented approach, an ordered fuzzy autoregressive model of order *p*, denoted OFAR(*p*), in a natural way is fully fuzzy AR(*p*) and can be expressed as

$$\overline{X}\_t = \overline{\alpha}\_0 + \sum\_{i=1}^p \overline{\alpha}\_i \overline{X}\_{t-i} + \overline{\varepsilon}\_t \tag{10.4}$$

where *Xt*−*<sup>i</sup>* are the ordered Fuzzy Candlesticks at a time period *t*, α*<sup>i</sup>* are fuzzy coefficients given by arbitrary OFNs, and ε*<sup>t</sup>* is an error term.

#### **Estimation of OFAR(p) Model**

The least squares method is proposed for the estimation of fuzzy parameters α*<sup>i</sup>* = ( *f*<sup>α</sup>*i*, *g*<sup>α</sup>*i*) in the OFAR(*p*) model and one is defined using a distance measure. The measure of the distance between two OFNs is expressed by the formula:

$$\operatorname{d}(A,B) = \operatorname{d}\left( (f\_A, g\_A), (f\_B, g\_B) \right) = \|f\_A - f\_B\|\_{L^2} + \|g\_A - g\_B\|\_{L^2} \tag{10.5}$$

where · is a metric induced by the *L*2-norm. Hence, the least squares method for OFAR(*p*) is to minimize the following objective function,

$$E = \sum\_{t} \mathbf{d}\left(\overline{X}\_{t}, \overline{\alpha}\_{0} + \sum\_{i=1}^{p} \overline{\alpha}\_{i} \overline{X}\_{t-i}\right) \tag{10.6}$$

#### **Forecasting Using the OFAR(p) Model**

Forecasts of the OFAR(*p*) model are obtained recursively in a similar way as for the classical AR(*p*) model. Let *t* be the starting point for forecasting. Then, the one-step-ahead forecast for *Xt*+<sup>1</sup> is

$$
\hat{\overline{X}}\_{t+1} = \overline{\alpha}\_0 + \sum\_{i=1}^p \overline{\alpha}\_i \overline{X}\_{t+1-i}. \tag{10.7}
$$

The result of the forecast is an Ordered Fuzzy Number, which includes three kinds of predictions:


#### **10.6 Conclusion and Future Works**

In this chapter, the representation of financial data using the concept of the ordered Fuzzy Candlestick is described. The ordered Fuzzy Candlestick holds more information about the prices than the classical Japanese Candlestick. Moreover, it is also possible to include information about the volume and spread. Based on well-defined arithmetic of Ordered Fuzzy Numbers, the proposed approach enables us to build the technical analysis indicators and the fuzzy financial time series models in the simple form of classical equations. It allows reducing the size of models compared to models based on fuzzy-rule-based systems. For future work, our approach can be extended by adding the concept of fuzzy random variables, which can allow for the simulation of models and their application in many other areas of financial engineering.

#### **References**


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Chapter 11 Detecting Nasdaq Composite Index Trends with OFNs**

**Hubert Zarzycki, Jacek M. Czerniak and Wojciech T. Dobrosielski**

**Abstract** The chapter presents a novel way of describing changes in the stock index and the identification of potential trends. The authors already used a similar approach to describe the stock exchange index [16]; this chapter is a continuation and another application of work on this issue. The method for detecting patterns in a trend by means of linguistic variables is described. The use of computational operations on numbers in the Ordered Fuzzy Number (OFN) notation [40–42] enables us to set the values of linguistic variables and thus conduct fuzzification of the input. By using one OFN number it is possible to store five parameters of index quotations (open, high, low, and close values as well as a change direction). The OFN numbers are conveyed into a linguistic form. In order to find trend sequence similarity the following applies: sequence identity with the input frame expressed as a percentage, frame size, the level of threshold conformity with the frame (threshold), and how often the pattern is present (frequency). A dedicated computer program to detect patterns is implemented. The program used data from the index Nasdaq Composite from the years 2006-2016. The results represent a further step to develop effective methods of rule-based forecasting.

H. Zarzycki (B)

University of Information Technology and Management Copernicus, ul. Inowroclawska 56, 53-648 Wrocław, Poland e-mail: hzarzycki@yahoo.com

J.M. Czerniak · W.T. Dobrosielski

Kazimierz Wielki University in Bydgoszcz, Institute of Technology, ul. Chodkiewicza 30, 85-064 Bydgoszcz, Poland e-mail: jczerniak@ukw.edu.pl

W.T. Dobrosielski e-mail: wdobrosielski@ukw.edu.pl

## **11.1 Introduction**

In comparison to existing methods, more accurate forecasting methods can be obtained using a rule-based forecasting (RBF), a technique combining data extrapolation [7, 13, 14, 25, 26, 43–45], time series [28, 29, 44, 45], and elements of expert systems [5–7, 22, 23, 34, 37, 46]. The four most important methods of extrapolation were used: linear regression, random walk, and Brown's exponential smoothing, as well as Holt's exponential smoothing. In order to create rules some information from the literature, surveys, and knowledge of several experts was adapted [17, 19–21, 36, 38, 39]. The rules were calibrated using 80 time series. In contrast, the validation needed another 40 series. In the opinion of the authors, RBF has been successfully applied by combining domain expertise with statistical methods. This has been confirmed by many studies in the recent literature, where rule-based forecasting is a fast-growing technology. It is worth mentioning a few examples from a very comprehensive literature such as M. Adya, J.S. Armstrong, and F. Collopy [1–3, 8, 9], who publish in the International Journal of Forecasting, a magazine that inspires other authors associated with the RBF methods. In this chapter time series of index data were preliminarily fuzzified [30, 33] to check the proposed methods of detecting trends [18]. Trends identified in the sequence of literals are then used to develop trend prediction rules. Therefore fuzzy logic [12, 13, 16, 35] was used to develop linguistic data input. Data for the study were quotations of the Nasdaq Composite index from the years 2006–2016. Figure 11.1 shows the data in an illustrative manner. Table 11.1 contains Nasdaq index data for a single trading day. Daily data are: opening, maximum, minimum, and closing values as well as the percentage change

**Fig. 11.1** NASDAQ Composite index quotations from 2006 to 2016


**Table 11.1** Selected historical NASDAQ Composite index. The dataset covers the time period from November 1, 2016 to November 30, 2016

as compared to the day before. These five values are replaced by the linguistic values. Table 11.1 shows both the linguistic values and index quotations.

## **11.2 Application of OFN Notation for the Fuzzy Observation of NASDAQ Composite**

Data from November this year for the NASDAQ Composite are presented in Table 11.1. Quotations are given in a widely used format for this type of time series. Subsequent letters of the alphabet represent values for consecutive trading days. Figure 11.2 shows an OHLC (open, high, low, close) chart of the Nasdaq Composite index for one month. The graph shows the following attributes for each of the daily quotations: opening, closing, highest, and lowest value. These attributes, along with the change parameter are shown in Table 11.1. In addition, decrease in quotation is

**Fig. 11.2** Nasdaq Composite OHLC chart for the period of November 1, 2016 to November 30, 2016 (based on www.stockcharts.com).



marked in red and increase is marked in black. Positions **A**, **B**, and **C** in Fig. 11.2 show a decrease in quotations on specified days. Another four quotations-**D**, **E**, **F**, **G**-show an increase in the value of the Nasdaq Composite. A very large spread between the minimum and maximum value, and between the opening and closing are on **H**; these are decreasing quotations. This is followed by increases to date **S** with only two days of drops (**J** and **N**) in the range. Point **P** is interesting, because the opening value is virtually level with the closing value, despite some fluctuations of the Nasdaq Composite value during the trading day. It is essential that **P** be located near the top of the local peak. Then visualizations **T** and **W** demonstrate declines from the local peak. As the chart above may not be unambiguous in terms of the trend interpretation the authors introduce the logic of Ordered Fuzzy Numbers [14, 24, 30] in order to interpret the quotations. Table 11.2 shows the OFN characteristic points with the Nasdaq Composite quotation parameters as listed in Table 11.2.

Figure 11.4 is an OHLC chart with Nasdaq index parameters. In the considered single day there has been an increase in quotations. The translation of data from Fig. 11.4 on the OFN is presented in Table 11.3. The resulting fuzzy number is interpreted graphically in Fig. 11.3. The arrow of fuzzy numbers is directed towards


**Table 11.3** Example of positively directed OFN number for the Nasdaq index

**Fig. 11.3** Graphically displayed positively directed OFN number and its characteristic points as used for the Nasdaq Composite

**Fig. 11.4** Graphically displayed change parameter positive value as used in the Nasdaq Composite OHLC chart

increasing values symbolizing the positive direction of the OFN and reflecting an increase in the quotations.

Figure 11.5 shows the fuzzy number stretched on the same values as in Fig. 11.3. However, the direction of the OFN here is the opposite. Chart 2.6 depicts the decrease in quotations for a single day of trading. It should be noted that the equivalent of the index's downward movement is a negative direction of the OFN (Fig. 11.6).

**Fig. 11.5** Graphically displayed negatively directed OFN and its characteristic points as used for the Nasdaq Composite

**Fig. 11.6** Graphically displayed change parameter negative value as used in the Nasdaq Composite OHLC chart

## **11.3 Ordered Fuzzy Number Formulas**

Nasdaq Composite index values *R*<sup>1</sup> ÷ *Rm* relate to a single trading day. Fuzzy observation in OFN notation is performed on a set of R. The observation is for one dependent and four independent attributes. For each day the number <sup>R</sup>*<sup>i</sup>* <sup>∈</sup> {*R*<sup>1</sup> <sup>÷</sup> *Rm*} is created of the four required values. Symbols of time are, respectively, *ti* , the day of the measurement, whereas *tOPEN* , *tMIN* , *ttMAX* i *tCLOSE* are, respectively, quotations of opening, minimum, maximum, and close value (Table 11.4).

**Definition 1** On a given day *ti* , the set forming fuzzy observation of the Nasdaq Composite index, is provided as

$$\mathbb{R}/t\_i \in \{ \mathbb{R}^{(0)}/t\_{OPEN}, \ \mathbb{R}^{(1)}/t\_{MIN}, \ \mathbb{R}^{(1)}/t\_{MAX}, \ \mathbb{R}^{(0)}/t\_{CLOSE} \} \tag{11.1}$$

where

*tCLOSE >* {*tMIN , tMAX* } *> tOPEN*

*f*R*(*0*) < f*R*(*1*) < g*R*(*1*) < g*R*(*0*)*


**Table 11.4** Example of a negatively ordered OFN as an interpretation of the Nasdaq index

The OFN arrangement (order) is synonymous with the measurement time of t movement intensity, where *t* ∈ {*tOPEN , tMIN , ttMAX , tCLOSE* }. The measurements must be performed in a specific order. The OFN order in Fig. 11.3 is the direction of index changes for one trading day. The default direction of OFN R is positive (Fig. 11.2).

#### **Lemma 1**

$$\mathbb{R}\_{positive} = \begin{cases} \mathbb{R}\_{CLOSE} \le \mathbb{R}\_{OPEN} \\ \mathbb{R}\_{OPEN}, \mathbb{R}\_{MIN}, \mathbb{R}\_{MAX}, \mathbb{R}\_{CLOSE} \\ f\_{\mathbb{R}}(0), f\_{\mathbb{R}}(1), g\_{\mathbb{R}}(1), g\_{\mathbb{R}}(0) \end{cases} \tag{11.2}$$

*and the opposite case is*

$$\mathbb{R}\_{negative} = \begin{cases} \mathbb{R}\_{CLOSE} > \mathbb{R}\_{OPEN} \\ \mathbb{R}\_{CLOSE}, \mathbb{R}\_{MAX}, \mathbb{R}\_{MIN}, \mathbb{R}\_{OPEN} \\ f\_{\mathbb{R}}(0), f\_{\mathbb{R}}(1), g\_{\mathbb{R}}(1), g\_{\mathbb{R}}(0) \end{cases} \tag{11.3}$$

The NASDAQ was launched in the 1970 s and was the first fully electronic securities trading system in the world. The stock market traded shares of companies mainly related to modern technology (IT). The Nasdaq Composite is one of the three major US indices, next to the Dow Jones Average and the S&P500 [47–50]. As for 2016, listed on the NASDAQ are approximately 3,000 companies, including Apple, Google, Microsoft, and Intel. The Nasdaq composite index is an aggregate of the common stocks listed on the NASDAQ stock market. The formula for aggregating fuzzy observation of subaggregate *Sm* for *n* component companies of the index is as follows.

**Definition 2** Fuzzy observation of index Nasdaq Composite at the time *ti* is a set of

$$s\_m = \sum\_{i=1}^{n} \begin{pmatrix} \mathbb{R}\_{positive} & \mathbb{R}\_{negative} \\ \mathbb{R} \cdot w\_i & | & -\mathbb{R} \cdot w\_i \end{pmatrix} \tag{11.4}$$

where *n* ≤ 3000 and *w<sup>i</sup>* ∈ {*w*1*,...wn*} is a vector of the individual companies' impact, default *w<sup>i</sup>* = 1.

The weight of each company in the index is

$$P\_j = \frac{\mathbb{R}\_j \ast w\_j}{\sum\_{i=1}^m \mathbb{R}\_i \ast w\_i} \ast 100\% \tag{11.5}$$

where *j* ∈ [1*, m*]

**Definition 3** If a subaggregate *Sm* of the Nasdaq Composite aggregate with a certain number n of (e.g., sector-related) companies has a different direction of the OFN from the direction of the main index, then it can be assumed that it is a predictor of trend change. This includes the rule:

> **IF** *N asdaqComposite is positive* **AND** *Sm is negative* **THEN** *Possible change is tr ue* (11.6)

#### **11.4 Conclusions**

Investing in the stock market is associated with high risk. This is due to the lack of ideal solutions for the analysis of market data and predictions in short- and long-term changes in indices, major stock market indicators. Processes occurring on the stock markets have nonlinear chaotic characteristics, making it difficult to study them. The technical analysis often uses expert knowledge and expert rules to detect and use recognizable trends [43]. One can base investment strategy on trends that will bring profits during the boom and limit losses when a market is in decline. Expert knowledge and rules can be transferred to digital form. Currently, there are many methods for identifying trends on the stock exchange [16, 50]. Many of them are unattractive due to their complicated structure. An interesting alternative to describing the phenomenon of the trend is the application of fuzzy numbers and fuzzy logic [4, 10, 11, 31, 32]. The chapter presents Ordered Fuzzy Numbers, which use five specific index parameters as well as index analysis methods to identify the occurrence of a trend. Ordered Fuzzy Number notation made it possible to replace up to five attributes (open, close, high, low, change) describing the index quotes with a single OFN. In addition, the use of OFNs lets one quickly detect changes in the trend, which is very important in short-term investments. The authors previously proposed similar solutions based on research WIG20 [16]; there are also other works on similar solutions and financial investment [27, 28]. The authors intend to carry out further research in this area in order to find more versatile and accurate prediction models to identify market trends.

#### **References**


R., Zadeh, L., Zurada, J. (eds.) Artificial Intelligence and Soft Computing, Lecture Notes in Computer Science, vol. 7894, pp. 365–375. Springer Berlin Heidelberg (2013). doi:10.1007/ 978-3-642-38658-9\_33


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Chapter 12 OFNAnt Method Based on TSP Ant Colony Optimization**

**Jacek M. Czerniak**

**Abstract** This chapter presents a hybrid method of swarm intelligence current. Intelligence represented by ant colonies has been enriched with fuzzy logic arithmetics. In this case Kosi ´nski's Ordered Fuzzy Numbers were specifically used. Apart from a fuzzy decision model of a single ant used earlier by other researchers, the author used the order as a trend support. By associating the direction of a number in Ordered Fuzzy Numbers (OFNs) with the trend observed in the ant colony it is possible to provide a unique description of a fuzzy observation of a colony behavior. The experiments were carried out in the area of searching for the optimal connecting route in the field. The experiment covered 10 complex issues of searching for the optimal route. All are benchmarks from the TSPlib repository which are well known among researchers. They represent the actual problems of route selection such as transport connections depending on geographic conditions and optimizing the machining process or the layout of the power networks. The complexity level of optimal solutions for problems to be solved amounted from several hundred to several thousand connections. Each of them was solved using six swarm intelligence methods and five well-known classical methods dedicated to the traveling salesman problem (TSP). The results were presented in the form of tables and graphs, and some of the routes were shown in graphical form. Final conclusions of the experiment indicate the superiority of methods based on ant colony optimization as regards closeness to optimal solutions. The results achieved by the OFNAnt method are generally better (in 92% of cases) than those achieved by classic methods and are in the forefront of solutions from the swarm intelligence group.

#### **12.1 Introduction**

The observation of living organisms is an interesting research field not only for biologists. A new current within artificial intelligence called swarm intelligence acquired significance in the 1990s [15]. Those studies were inspired by observation of animals

J.M. Czerniak (B)

© The Author(s) 2017

Kazimierz Wielki University in Bydgoszcz, Institute of Technology, ul. Chodkiewicza 30, 85-064 Bydgoszcz, Poland e-mail: jczerniak@ukw.edu.pl

P. Prokopowicz et al. (eds.), *Theory and Applications of Ordered Fuzzy Numbers*, Studies in Fuzziness and Soft Computing 356, DOI 10.1007/978-3-319-59614-3\_12

and insects living in colonies [44]. We have finally got successful experiments and methods based on ant or termite colony observation [13, 20, 43, 45]. Observations of birds in V-formation inspired many researchers to create and to develop the concept of particle swarm optimization. [24]. Those studies in the field of AI were also inspired by information obtained from marine biologists on the collective intelligence of a shoal of fish or plankton. Other sources of inspiration stemmed from the development of industry, in particular the automotive industry in that case. Particle swarm optimization was created thanks to studies on, among others, sandblasting of a car body or other corroded metal parts. Hence, generally, this branch of AI has been called swarm intelligence [11, 14, 25, 38]. Conversion of those intelligence mechanisms prevailing among simple individuals into the field of computer systems resulted in creation of the current sometimes called computational swarm intelligence. It exists parallel to the branch of science called multiagent systems and those two fields often overlap one another. Although they are often not directly based on associations with colonies of living organisms, they are often similar in their rules of operation. They enable creation of interesting implementations in the domain of parallel computing. The development of swarm intelligence was preceded by the development of multiple-valued logic, in particular, fuzzy logic. The author of fuzzy logic is an American professor at Columbia University in New York City and Berkeley University in California, Lotfi A. Zadeh, who published the paper entitled "Fuzzy Sets" in the journal, Information and Control, in 1965 [5]. He defined the term of fuzzy set there, thanks to which imprecise data could be described using values from the interval (0,1). The number assigned to them represents their degree of membership in this set. It is worth mentioning that in his theory Zadeh used the article on three-valued logic published 45 years before by a Pole, A. Janukasiewicz [6]. That is why many scientists in the world regard this Pole as the "father" of fuzzy logic. The next decades saw the rapid development of fuzzy logic. As the next milestones in the history of that discipline one should necessarily mention L-R representation of fuzzy numbers proposed by D. Dubois and H. Prade [7, 8], which enjoys great success today. Coming back to the original analogy, an observer can see a trend, that is, a general increase during a rising tide or decrease during low tide, regardless of momentary fluctuations of the water surface level. This resembles a number of macro- and micro-economic mechanisms where trends and time series can be observed. The most obvious example of that seems to be the bull and bear markets on stock exchanges, which indicate the general trend, while shares of individual companies may temporarily fall or rise. The aim is to capture the environmental context of changes in the economy or another limited part of reality. Changes in an object described using fuzzy logic [30, 32] seem to be thoroughly studied in many papers. But it is not necessarily the case as regards linking those changes with a trend [39, 41, 42]. This might be the opportunity to apply generalizations of fuzzy logic which are, in the opinion of authors of that concept, W. Kosi ´nski [9–11] and his team [12, 13], Ordered Fuzzy Number (OFN) [28, 33, 40]. There are already interesting studies available published by well-known scientists [1, 18] that present successful implementation of fuzzy logic to swarm intelligence methods, including methods inspired by ant and termite colonies. However, according to the best knowledge of the authors of this chapter, nobody thus far has published studies on implementation of ordered fuzzy logic into ant colony optimization. This fact was one of the reasons for execution of the research described in this chapter. The main emphasis here is on application of a new hybrid method of ant colony optimization (ACO) with implemented decision logic of an ant calculated in the OFN domain in order to solve the optimum route selection problem. To make a comparison, the authors selected several well-known ant methods and several heuristic methods dedicated to solving the same problem, the methodology of which does not use either swarm intelligence or, in particular, ACO.

## **12.2 Application of Ant Colony Algorithms in Searching for the Optimal Route**

Ant colony optimization is currently one of the best known ant colony algorithms. It was first defined by Dorigo, Di Caro, and Gambardell in 1999 [16] as a method for discrete optimization problems. ACO was presented as the algorithm that can find a good route using a graph. It was inspired by foraging theory [14] both for ant colonies and for discrete optimization problems. This algorithm is designed for solving two kinds of static and dynamic optimization problems. In the general case, ant colony optimization is performed according to the diagram shown in Fig. 12.1). Studies of ant colony algorithms commenced based on observation of ant colony environments. The scientists noticed the interesting fact that ants communicate mainly using chemical substances which they produce. As has already been mentioned, the key matter in this

**Fig. 12.1** ACO block diagram

algorithm is indirect foraging communication represented by pheromone trace. The advantage of the evaporation of that pheromone is that it can prevent convergence for local optimum solutions. Assuming there is no evaporation issue, each time each path selected by the first artificial agents would be treated in the same way and would be equally attractive, which would make it inapplicable to optimization problems. Thus, when one ant finds a good path from the colony to the food source, this path becomes preferable for other ants. The idea behind the ACO [13] algorithm is to follow that behavior using artificial agents moving within the frame of a graph in order to solve a given problem. The ACO algorithm has been used for solving the traveling salesman problem. This algorithm has an advantage over genetic algorithms or the simulated annealing algorithm. Its important feature is that for a dynamically changing graph, the ACO algorithm can work continuously and it can adapt to the changes in real-time. Thanks to such properties, it has been applied to the method of solving the problem of network routing and urban transportation systems.

Route selection: An ant shall travel the distance from point i to point j with the probability of:

$$p\_{ij} = \frac{(\mathfrak{r}\_{ij}^{\alpha})(\eta\_{ij}^{\beta})}{\sum (\mathfrak{r}\_{ij}^{\alpha})(\eta\_{ij}^{\beta})} \tag{12.1}$$

where τ*i j* is the quantity of pheromone on the route i,j, η*i j* defines attraction of the route i,j, α is the parameter used for effect control τ*i j* , and β is the parameter used for effect control η*i j* .

Pheromone update: This issue is represented by the following formula.

$$
\pi\_{ij} = p\pi\_{ij} + \Delta\pi\_{ij} \tag{12.2}
$$

where τ*i j* is the quantity of pheromone on the route i,j, Δτ*i j* represents the quantity of remaining pheromone, and *P* is the pheromone evaporation scale.

Below, we present a more detailed pseudocode of one of the numerous ant colony algorithms, called the ACS (ant colony system), that is, ant colony optimization. Tables 12.1 and 12.2 present the most important ant colony optimization algorithms dedicated to TSP in the chronological order of their publishing. In the methodological sense, all the algorithms listed below and described in the following section are direct successors of the ant system. This is due to an obvious reason, the ant system method, which has become the foundation for the entire new branch of knowledge, was the first worldwide success of then young scientist, Marco Dorigo. Now Professor M. Dorigo [14] is a world-class expert in the field of swarm intelligence. The set of methods presented below is in chronological order.

#### **Algorithm 1** Pseudocode of the ACS Ant Colony Algorithm [10]

1: Initialize 2: Repeat { 3: Place each ant in a randomly chosen city; 4: For each ant 5: Repeat { 6: Choose NextCity (each ant);


14: Print Best Path;


**Table 12.1** ACO algorithms that have already been applied to the TSP

#### **12.3 OFNAnt, a New Ant Colony Algorithm**

Implementation of OFN to the ant colony system consists mainly in determination of the trend and in establishing relationship to the order of the OFN. This order is used in OFNAnt in two ways. It is related to pheromone evaporation on the route and its mathematical description, and it also concerns the decision-making process of a single ant.

The pheromone quantity on the route is updated in accordance with OFN arithmetic. If the pheromone trace (quantity) on the route increases, then this trend is marked as a positive order trend, whereas if this quantity decreases it is marked as a negative order trend. Each pass of the kth ant, which is associated with placing pheromone trace results in the update of the pheromone trace on the route by the amount left by the ant resulting in positive order on the route with increasing trend and with negative order for decreasing trend of the route. The above relationship is pursuant to the formula:

$$\tau\_{ij}[l\_A, 1\_A^-, 1\_A^+, p\_A] \leftarrow \tau\_{ij}[l\_A, 1\_A^-, 1\_A^+, p\_A] + \sum\_{k=1}^m \Delta \tau\_{ij}^k[l\_k, 1\_k^-, 1\_k^+, p\_k] \tag{12.3}$$


**Table 12.2** List of analyzed problems including their optimum values

Every ant constructs a complete route, and the ants make a decision at each stage of the route construction. This creates a multistage process of fuzzy control. When talking about route construction, we usually refer to the situation when an ant located in town i wants to go to town j and makes a decision based on the following information.


The decision-making process taken by an ant at each node of the route is associated with calculation of fuzzy probability in the OFN sense. The probability is calculated pursuant to the following redefined formula of the route selection probability (Fig. 12.2).

$$P\_{ij}^k[l\_A, 1\_A^-, 1\_A^+, p\_A] = \frac{|\tau\_{ij}[l\_A, 1\_A^-, 1\_A^+, p\_A]|^\alpha |\eta\_{ij}[l\_A, 1\_A^-, 1\_A^+, p\_A]|^\beta}{\sum\_{l \in N\_i^k} |\tau\_{ij}[l\_k, 1\_k^-, 1\_k^+, p\_k]|^\alpha |\eta\_{ij}[l\_k, 1\_k^-, 1\_k^+, p\_k]|^\beta} \tag{12.4}$$

## **12.4 Experiment**

## *12.4.1 Experiment Execution Method*

In this section, the author compares the effectiveness of heuristic methods, metaheuristic methods, and the new hybrid method OFNAnt. All those methods are tested using 10 benchmarks for their performance in solving an NP-hard problem such as TSP. Thus, it is a comparison of well-known algorithms with a completely new approach represented by OFN arithmetics implemented to control an ant colony in order to solve optimizing problems [21, 22, 27]. They are tested according to the following principles.

	- By specification of the obtained result (route length)
	- As a percentage, that is, optimum achieved in x%, as presented in the table including the set of benchmarks

allows easy assessment of the hierarchy of all the algorithms on the basis of the 10 benchmarks used for tests.

#### *12.4.2 Software Used for Experiment*

The author's own implementation of ant colony methods developed in JAVA language was used in the experiments and the results obtained by the implementation were verified on the basis of ACOTSP [14]. The author's OFNAnt method was added to the implementation. The CONCORDE application was developed to solve symmetric TSP-type problems and other problems of network optimization [3, 17]. The application is supported by the Office of Naval Research, National Science Foundation, and by the School of Industrial and System Engineering at the Georgia Institute of Technology, United States. This program uses the cutting planes algorithm. The interface of the program shows the optimum solution searching process displayed at the end of each main iteration. The edges are colored according to currently calculated LP value (linear programing relaxation). At the moment when a new, better solution is found, the color of edges is changed to red. The program includes several algorithms designed to create edges used by the program to search for the optimum solution. Those algorithms include:


The program also includes several heuristic [2] algorithms for the TSP problem. Those algorithms include:


#### *12.4.3 Experimental Data*

Table 12.3 shows 10 benchmarks selected from the TSPlib library of TSP problems, including the expected optimum value for each. They were applied in a way described in the previous paragraph as a set of benchmarks for testing well-known algorithms and a new OFNAnt method.


**Table 12.3** List of analyzed problems including their optimum values

#### **12.5 Results of Experiment**

A number of tests were performed according to the above-specified rules, using 10 selected problems. Results of individual tests are presented below assisted by the diagram and a brief note for each.

**Eil51** The authors presented an experiment for 51 towns, the optimum value for which amounts to 426. As a result of the calculations 7 out of 10 algorithms generated an optimum result. It is worth noting that only one classical algorithm (ALK) generated the best result. Other ALK algorithms showed low effectiveness for a relatively small problem. All ant colony algorithms showed excellent performance when solving the above problem (Fig. 12.3).

**D198** Another test was performed for 198 towns and it showed the advantage of ant colony algorithms (ALM) over ALK algorithms again. This time 5 out of 10 available ALM algorithms have found the optimum, but AS achieved a result only 0.01% worse than the optimum. The best ALK, namely Lin-Kernighan achieved 99.70% of the optimum, which is quite a good result. Other ALK algorithms achieved only 88% of the optimum value (Fig. 12.4).

**Fig. 12.3** Graphical representation of the results for the problem Eil51

**Fig. 12.4** Graphical representation of the results for the problem D198

**Pcb442** represents the problem covering 442 towns. It is the hardest problem thus far, because only 3 out of 10 tested algorithms, BWAS, EAS, and ACS have found the optimum. MMAS missed the best solution by only 0.01%. Leading algorithms as regards this problem also include, respectively: ASRK with the result of 99.79%, AS 99.64%, and LK 99.43%. As can be noted, 3 ALM algorithms achieved optimum, one missed the optimum by the skin of its teeth, then, two further ALM algorithms achieved very good results and, again, the best of the ALK algorithms, that is, LK was the last on the list. The remaining ALK algorithms performed even worse than for the problem with 318 towns and achieved from 80 to 87% of the optimum (Fig. 12.5).

**Rat783** represents the problem covering 783 towns. In this case 3 algorithms achieved optimum solution, namely EAS, MMAS, and ACS; BWAS missed the optimum solution by 0.02%, and ASRK missed it by 0.07%. For the first time we have the situation where the ALK algorithm, that is, LK with the score of 99.72% outdistanced a representative of ALM algorithms, the AS algorithm with the score of 99.69%. Other ALK algorithms were unrivaled (Fig. 12.6).

**Pr2392** The last of the 10 presented problems was also the biggest one as it included as many as 2,392 towns. There is no doubt that the bigger the problem is, the worse the solutions. The first four places on the list were taken by ALM algorithms, where ACS was the best with the score of 99.59%. One of the ALK algorithms,

**Fig. 12.5** Graphical representation of the results for the problem Pcb442

**Fig. 12.6** Graphical representation of the results for the problem Rat783

namely LK, was fifth on the list with the score of 98.63%. Two subsequent places on the list were taken by ALM algorithms, that is, by EAS with the score of 98.39% and by AS with the score of 97.80%. The remaining ALK algorithms followed the trend of worse solutions and with the increased problem complexity they achieved from 79 to 85% of the optimum.

#### **12.6 Summary and Conclusions**

Having performed a number of experiments according to the rules specified above, one can be certain about the superiority of ant colony algorithms over classical algorithms (Fig. 12.7). There was only one case out of 10 studied samples, where the Lin-Kernighan (LK) algorithm achieved better results than all other known methods, including ant colony methods. This could have resulted from the nature of the problem, that is, nrw1379. In that case the results obtained by the LK algorithm were only slightly worse than the results of the OFNAnt algorithm. For the remaining files, the LK algorithm outpaced, at best, only older ant colony methods, AS and EAS.

**Fig. 12.7** Graphical representation of the results for the problem Pr2392

The remaining algorithms from the group of heuristic methods performed definitely much worse than the leading algorithms. They fulfilled the optimum solution within the range from 79 to 89%, which is far from the results of the leading algorithms. The noticeable feature of the studied group of algorithms is their tendency for worse results with the increase of problem magnitude. A clear example of that tendency is the seventh tested problem, pcb1173. This statement is confirmed by problem d1291 and further large datasets. The diagram presented above, which summarizes all performed tests, shows the hierarchy of all algorithms and their respective scores. The maximum available score is 1,000 points. The scores closest to the maximum were achieved by representatives of ant colony algorithms, including OFNAnt with the score of 999.31 points. It is worth noting that the first four places on the list of optimum solution searching efficiency are taken by ant colony algorithms. Subsequent places on the list are taken by representatives of heuristic methods with their definite leader, the LK algorithm, which is widely regarded as one of the best methods for solving the traveling salesman problem. Ant colony algorithms represent a new generation of optimizing algorithms using a metaheuristic approach to NP-hard problems, the approach that gave excellent results. Ant colony algorithms find many more applications other than TSP. Those applications include many real-life fields. Based on the results of experiments with the new method using trend and fuzzy logic, one can also expect obtaining interesting solutions for problems other than those where ant colonies have already been successfully applied. The new method, OFNAnt, which is a hybrid combination of ACO and OFN, and introduces fuzzy decision of an ant, is the first known attempt to implement the arithmetic of Ordered Fuzzy Numbers to ant colony optimization. Performed experiments confirmed efficiency of that method in solving TSP problems. Currently, there are ongoing works on application of the modification of that method for solving problems of other classes.

**Acknowledgements** The authors would like to express their thanks to employees of AIRlab - Artificial Intelligence and Robotics Laboratory at Casimir the Great University in Bydgoszcz for their commitment and help during research and tests performed within this study.

## **References**


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Chapter 13 A New OFNBee Method as an Example of Fuzzy Observance Applied for ABC Optimization**

#### **Dawid Ewald, Jacek M. Czerniak and Marcin Paprzycki**

**Abstract** The chapter includes a hybrid concept combining bee colony optimization with the application of Ordered Fuzzy Numbers. This is another research, after the OFNAnt method, prepared in AIRlab - Artificial Intelligence and Robotics Laboratory at Kazimierz Wielki University in Bydgoszcz, in which authors enriched metaheuristics by implementing the arithmetics of Ordered Fuzzy Numbers (OFNs). Applied fuzzy observation enabled very faithful modeling of the navigation mechanism used by bees when orienting with reference to the position of the sun. Experiments aimed at verification of the developed concept have been carried out on a set of several commonly known benchmarks. The preliminary results of experiments allow us to nurture grounded hope that further modifications of the metaheuristics using OFN arithmetics shall enable smooth control of the optimization criteria of the tested phenomena.

#### **13.1 Introduction**

Swarm intelligence is a relatively young branch of artificial intelligence. Its beginnings are usually pinpointed in the early 1990s of the past century. At that time Marco Dorigo published his doctoral thesis concerning ant colony systems. After studies on ants, articles related, among others, to termite hills have appeared [11, 43]. Not only insects became the inspiration for researchers interested in "social algorithms." Indeed, common interest is aroused by V-formations of birds, shoals of

D. Ewald (B) · J.M. Czerniak

Kazimierz Wielki University in Bydgoszcz, Institute of Technology,

Ul. Chodkiewicza 30, 85-064 Bydgoszcz, Poland

e-mail: dawidewald@ukw.edu.pl

J.M. Czerniak e-mail: jczerniak@ukw.edu.pl

M. Paprzycki Systems Research Institute of the Polish Academy of Sciences, Ul. Newelska 6, 01-447 Warsaw, Poland e-mail: marcin.paprzycki@ibspan.waw.pl

fish, or plankton and locust swarms. Studies on bivalves and their use in water intake purity assessment systems are also very interesting. As regards those inspirations, the beginning of the twenty-first century undoubtedly belongs to bees. The bee swarm optimization algorithms make up a collection of algorithms inspired by the behavior of honeybees [34, 35]. Observations performed as early as the mid-twentieth century by the German zoologist Martin Lindauer, who published his study in 1950 are usually regarded as the first ones [30]. Lindauer noted that bees returning to the swarm with food perform a sort of "dance." Thanks to further observations, Lindauer concluded that only a small percentage of bees participate in making a decision on changing to the new food source. Most bees do not participate in the foraging but wait for the decision to be made by the "dancing" bees, who gradually reduce the number of proposed sources. When a single location is finally selected, most of the bees rise to fly towards the selected food source. Further entomologists proved the theory on the meaning of the dance performed by the bees. They gave incontrovertible proof that a scout bee returning to the hive uses its dance and pheromone to provide information allowing the swarm to figure out the type of food it met. Bees navigate by the sun, therefore the first theory that has been proven was the fact that the angle of the bee body is indicative of the direction of flight relative to the sun. Next, the information is carried by the amplitude of the individual's vibrations as it is directly proportional to the abundance of the food source, and the length of the movement in a given direction informs the observer about the necessary length of the flight. There are three types of dance used by bees to depict the distance to the food:


Figure 13.1 presents the dancing bee and the method of reading the submitted information (Fig. 13.2).

**Fig. 13.1** The dance used by bees to depict the distance to the food

**Fig. 13.2** Navigation by the sun

On the basis of entomologists' studies, one can also conclude that the dance process is a way of reconciling the opinion of bees on the new location of food, a kind of voting. However, that hypothesis included some inconsistencies, as sometimes bees rose to fly despite the absence of unanimous decision of dancing bees and as the way of voting for dancing bees by other bees could not be observed. This caused formulating and attempting to prove two new hypotheses: a quorum hypothesis, whereby the voting in which the majority of the bees voting for a given nest is sufficient and a consensus hypothesis, denoting agreement of some group of dancing bees. On the basis of experimental studies scientists have managed to exclude the consensus hypothesis, whereas the quorum hypothesis has been confirmed. It turned out that, after reaching the quorum, the scout bees returned to their group at the same time creating the characteristic sound received by the remaining bees which stimulated them to warm up their muscles. This warm-up usually took about an hour and immediately after it bees flew to a new source of food (Fig. 13.3).

The behavior of bees when selecting a new nest can well be used for a decision made by any group. Thanks to three factors defined by scientists studying behavior of bees, such a decision shall always be correct (Fig. 13.4).

1. Organization allowing knowledge sharing by the entire group. It is much easier to make proper and unanimous decisions thanks to a large number of objects taking part in the decision-making process and correct distribution of knowledge among the objects.

**Fig. 13.4** The dance angle indicates the angle of navigation with regard to the sun


#### **13.2 ABC (Artificial Bee Colony) Model**

The artificial bee colony (ABC) is a model proposed in 2005 by the Turkish scientist Dervis Karaboga. As with other algorithms described herein [12, 13, 26, 28, 29, 32, 33], ABC is also based on the swarm behavior of honey bees. It differs from other algorithms in the application of a higher number of bee types in a swarm [10]. After the initialization phase, the algorithm consists of the following four stages repeated iteratively until the number of repetitions specified by the user is executed [4, 18–20] (Fig. 13.5):


The algorithm starts with initialization of the food source vectors −→*<sup>x</sup> <sup>m</sup>* where *<sup>m</sup>* <sup>=</sup> 1,..., *SN* and *SN*, …, is the population size. Each of those vectors stores *n* values *xm*,*i* = 1,..., *n*, that shall be optimized during execution of that method. The vectors are initialized using the formula:

$$\mathbf{x}\_{mi} = l\_i + rand(0, 1) \cdot (\boldsymbol{u}\_i - l\_i) \tag{13.1}$$

where *li* is the lower limit of the searched range, and *ui* is the upper limit of the searched range.

Bees adapted to different tasks participate in each stage of the algorithm operation. In the case of ABC, there are three types of objects involved in searching [3, 19, 21]:


Once the initialization phase is completed, Employed Bees start their work. They are sent to places in the neighborhood of already known food sources to determine the amount of nectar available there. The results of the Employed Bees' work are used by Onlooker Bees. Employed Bees randomly select a potential food source using the following relationship.

$$
\overrightarrow{\boldsymbol{\upsilon}}\_{i} = \boldsymbol{\chi}\_{mi} + \varphi\_{mi}(\boldsymbol{\chi}\_{mi} + \boldsymbol{\chi}\_{ki}) \tag{13.2}
$$

where←− *V <sup>i</sup>* is a vector of potential food sources, *xk* is a randomly selected food source, and ϕ*mi* is a random number from the range [−*a*, *a*].

Once the vector is determined, its fitting is calculated based on the formula dependent on the problem being solved and the fitting ←−v *<sup>m</sup>* is compared with ←−*x <sup>m</sup>*. If the new vector fits better than the former one, then the new one replaces the old one.

Another phase of the algorithm operation is the Onlooker Bees stage. They are sent to food sources classified as the best ones and in those very points the amount of available nectar is determined. The probability of the source selection is expressed with the formula:

$$p\_m = \frac{fit\_m(\overrightarrow{\boldsymbol{\chi}}\_m)}{\sum\_{m=1}^{SN} fit\_m(\overrightarrow{\boldsymbol{\chi}}\_m)}\tag{13.3}$$

where *fitm*( −→*x <sup>m</sup>*) is the value of fitting functions for a given source.

Obviously, when Onlooker bees gather information on the amount of nectar, such data are compared with results obtained thus far and if the new food sources are better, they replace the old ones in memory. The last phase of this algorithm operation is exploration by Scouts. Bees of that type select random points from the search space and then check nectar volumes available there. If newly found volumes are higher than the volumes stored thus far, they replace the old volumes. The activity of those bees makes it possible to explore the space unavailable for the remaining types of bees thus allowing omitting any extremes.

#### **13.3 Selected OFN Issues**

There are researchers who focus on certain aspects of fuzzy logic application in artificial bee colony optimization. Their articles are literally related to Zadeh's fuzzy sets and the fuzzy number arithmetics arose from them chronologically. Combining the Ordered Fuzzy Numbers (OFNs) with artificial bee colony optimization has not been proposed thus far. Articles describing such a hybrid approach to optimization tasks using ant colony algorithms are named OFNAnt [5, 6, 8, 31].

Basic research on many aspects of OFNs has been published in many papers of the creator of this concept, W. Kosinski [14, 23–25, 39, 40], and of a broad group of researchers who cooperated with him in this field of science [1, 7, 10, 15–17, 22, 27, 42]

[2, 9]. However, it is not the purpose here to cite the well-developed and wellknown deliberations on the OFN, which, in some of the new articles, are also known as Kosinski's fuzzy numbers (KFNs) [36–38, 41].

#### **13.4 New Hybrid OFNBee Method**

Application of OFN notation in artificial bee colony optimization seems to be a completely natural way to describe the behavioral mechanisms observed in a hive and mentioned above. The input data are pieces of information carried by a single bee:


Figure 13.6 shows the OFN describing information delivered by a Scout bee:


	- 1. Initialize the population of solutions *xi*,*<sup>j</sup>* .
	- 2. Evaluate the population.
	- 3. Cycle = 1.
	- 4. Repeat.
	- 5. Produce new solutions (food source positions) v*<sup>i</sup>*,*<sup>j</sup>* in the neighborhood of *xi*,*<sup>j</sup>* for the employed bees using the formula v*<sup>i</sup>*,*<sup>j</sup>* = *xi*,*<sup>j</sup>* + φ*i j*(*xi*,*<sup>j</sup>* − *xk*,*<sup>j</sup>*) (*k* is a solution in the neighborhood of *i*, and φ is a random number in the range [-1,1]) and evaluate them.
	- 6. Apply the greedy selection process between *xi* and v*<sup>i</sup>* .
	- 7. Calculate the probability values *Pi* for the solutions xi by means of their fitness values using the Eq. 13.4

$$P\_i = \frac{fit\_i}{\sum\_{i=1}^{SN} fit\_i}.\tag{13.4}$$

In order to calculate the fitness values of solutions we employed the Eq. 13.5:

$$\begin{array}{cc} \begin{array}{c} \frac{1}{1+f\_i} \end{array} & \begin{array}{c} if \ f\_i \ge 0 \\ 1+abs(f\_i) \text{ if } \ f\_i \le 0 \end{array} \end{array} \end{array} \tag{13.5}$$

Normalize *Pi* values into [0,1].


$$\alpha\_{ij} = \min\_j + \text{rand}(0, 1) \* (\max\_j - \min\_j). \tag{13.6}$$


#### **13.5 Experimental Results**

This section includes results of our own tests solved using the OFNBee algorithm. Ten calculations were performed for each of the three optimization problems described below. Average values were calculated from the obtained results and then compared with results available in the literature for the classic ABC algorithm. Program settings for individual problems are presented in Table 13.1. where individual abbreviations mean, respectively:


For the first tested problem, the welded beam, the best results for program settings were obtained by the classic ABC algorithm and are shown in Table 13.2. The fillet weld width is defined by the variable *x*1, and *x*2 is the parameter defining the weld length, *x*3, the beam height, and *x*4, the beam width. After listing and comparing the results obtained using OFNBee and the classic ABC algorithm, one can notice that the solutions are similar. The result of the experiment for the objective function differs from the second decimal place which confirms repeatability of good results (Fig. 13.7). Another problem tested in the experiment is the pressure vessel problem. The wanted variables are shown in Fig. 13.8. The aim of this experiment is to minimize the total material costs of the cylinder and its welding. Solutions found by the ABC algorithm for this problem for given program settings are shown in Table 13.3. Comparing the experimental outcomes with the results available in the literature one


**Table 13.1** Program settings for the tested design problems


**Table 13.2** Parameters and value limits of the best solutions obtained for the welded beam problem

can notice that there are no significant differences for variables from *x*1 to *x*3 whereas for variable *x*4 a bigger difference occurs which may significantly impact the final objective of the problem. However, for relatively large limits of the variables, the experiment result is satisfactory. In the speed reducer optimization problem, its mass is minimized. The test results for that problem are given in Table 13.4. In this case seven variables are subject to limitations, as shown in Fig. 13.9. The variables define, respectively: *x*1, surface width; *x*2, teeth pitch module; *x*3, number of teeth of a gear; *x*4, length of the first shaft between bearings; *x*5, length of the second shaft between bearings; *x*6, diameter of the first shaft; and *x*7, diameter of the second shaft.

After listing and comparing the results one can notice that there are only very minor deviations for individual variables. In this problem, the objective function differs very little from the results available in the literature. That may be caused by narrow intervals of the variables and numerous limits for the function.

pressure vessel optimization problem



**Table 13.4** Parameters and value limits of the best solutions obtained for the speed reducer problem


## **13.6 Conclusion**

The structure of the ABC solutions allows adjusting the algorithm very freely to the newly raised problem. This makes it very useful in solving multiobjective optimization problems. Its second important feature is the algorithm's fast operation. Thanks to the modification that consists in application of the Ordered Fuzzy Numbers to determination of the objective function, the obtained result is of better quality. The algorithm operation time has improved as well. It should be noted that in each of the three analyzed benchmarks (tested problems), the results obtained using the OFN-Bee algorithm are at least as good and often better than without the modification. The authors analyzed the welded beam optimization problem, pressure vessel optimization problem, and the speed reducer optimization problem. The results of the conducted experiments are presented in Tables 13.1, 13.2, and 13.3. In the future, we plan to extend the field of OFN application to the calculations in several artificial bee colony algorithms. We expect that it could give some interesting results.

## **References**


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Chapter 14 Fuzzy Observation of DDoS Attack**

**Łukasz Apiecionek**

**Abstract** DDoS attacks are able to block Web servers. Such attacks could be started from anywhere in the network. This chapter presents the possibility of using Ordered Fuzzy Numbers (OFNs) for observation of a DDoS attack. The proposed algorithm could be implemented on routers and predict the moment of the attack. Such prediction gives a possibility for the network administrators to protect server resources. In the chapter the author presents the real test results made on a prepared IP network. The presented results prove that OFNs have a huge potential for usage in observation of DDoS attacks.

**Keywords** DDoS · Security · Fuzzy logic · Fuzzy observation

## **14.1 Introduction**

Today the main network used is the Internet which could be described as a wide area network (WAN). Many huge companies have many offices in different locations connected to the Internet. In this situation often some virtual private networks (VPN) are created to connect the locations in a secure way. This gives a possibility to block the company using a distributed denial of services (DDoS) attack on such systems. Such an attack could block the server from managing connections and thus resources and could generate financial loss for this company. That is why this problem is very common and should be solved.

Ł. Apiecionek (B) Kazimierz Wielki University, Institute of Technology, ul. Kopernika 1, 85-074 Bydgoszcz, Poland e-mail: lapiecionek@ukw.edu.pl

#### **14.2 DDoS Attack Description and Recognition**

These attacks are well described in the literature [1–3]. There are many possible types of such attacks. One of them could use TCP/IP sockets vulnerabilities [2, 4], whereas others could use domain name system (DNS) server vulnerabilities. As mentioned, the main principle of such attacks is to try to utilize all server resources by generating a lot of ordinary user connections. The number of such connections can exceed the servers' capability to handle them. Many papers [1–3, 5, 6] provide methods for dealing with DDoS attacks. These methods could be described as detection and the necessary cooperation between network providers. This is because the attackers send their packets through the network which belongs to a network provider. Therefore only network providers can block the attacker traffic. If they do not block such traffic, that traffic will saturate data links. This saturation causes blockage of the connection to the server [7] which could block some valuable portals such as e-learning platforms [8, 9]. Some of the methods for detecting DDoS attacks use general- purpose computing on graphics processing units [10], whereas others recommend protecting networks with a firewall [11, 12]. Intrusion prevention systems and intrusion detection systems use huge databases that consist of data collected during simple attacks from one place on the network [11]. But detecting attacks in a real worldwide network, such as a WAN, is a very complicated process. Some authors claim that it could be ensured by cooperation of routers, firewalls, and Internet providers [13–15]. Other possibilities include the use of fuzzy logic for this purpose [16, 17]. Such a solution requires a great deal of effort from experts who have to provide the rules describing the possible attack. Then, these rules are used for attack observation.

#### **14.3 The Idea of Attack Recognition and Prevention**

The proposed idea of attack observation, for recognition and prevention, is to limit performance of a network device during the attack that will limit the number of connections made to the target of the attack. Nowadays there are methods for limiting incoming traffic on a firewall and they allow the servers to deal with the already established connection. This should let the users finish their work and enable new users to connect to the server. Such known methods are quality of service (QoS) methods. QoS methods let the network administrators limit data traffic that could be described by many parameters such as source address, destination address, protocol, port, and so on. This solution also makes it possible for the router to count incoming traffic and decide which packet will be transferred as first and which will be the last.

There are some papers describing the QoS method idea that can work on one router and try to protect network resources locally [18]. But this solution does not recognize the source of the attack and does not solve the problem. When the packets are not blocked the hacker is still able to send packets to the server and block its resources. Nowadays routers are, of course, exchanging a lot of information between them. The main information describes the reachability of the IP networks. This is done by routing protocols such as OSPF, EIGRP, BGP, or multicast routing protocols [19, 20]. This mechanism can be used for recognizing the DDoS attacks with some Ordered Fuzzy Numbers (OFNs) implemented. As has already been mentioned, QoS methods are able to count the number of packets, but they are not able to decide if the packet is part of a DDoS attack on a server. There is a need for new services for network providers. Those services should provide mechanisms for detecting the attackers' packets to enable the router to block them on all the network routers, not only on the firewall that operates in front of the target of the attack. Such services should be implemented in an easy way, and it should use some well-known mechanism such as exchanging information between routers via routing protocols. Such a solution is the simple network management protocol (SNMP) which is used for acquiring knowledge on traffic statistics. The solution proposed by the authors for recognizing DDoS attacks using OFNs could be implemented on routers and require collecting traffic statistics. This method should not utilize too many resources of the routers, therefore it should also cooperate with the possible target of the attack. The author defines this method in the following steps.


These steps are presented in Fig. 14.1. This idea is very simple and can be implemented very easily. The proposed algorithm uses SNMP and IPSec encryption. Some known aspects of the attack are used. The first is that the target of the attack is a server. The consequence of that fact is that the server should recognize it is under attack. The network alone is not able to decide if the server is under attack. Second, if the routers get the information that they have to block some specific traffic, they could do it. Routers could block specific traffic to the server using an already implemented mechanism such as random early detection. The process of passing the information from the server to the router that there is an attack has to be protected and both sides of the communication have to be authenticated. This could be achieved using a second already existing mechanism such as IPSec encryption and public-key infrastructure. Nowadays many organizations possess X.509 certificates signed by authorized certification authorities. The aforementioned secure communication channel, established by IPSec, could be used for passing the information from the server to the router that

**Fig. 14.1** The algorithm concept

the server is under attack. This message can also include information about the kind of traffic to be blocked in the network. There could also be SNMP used in a secured IPSec channel to pass the information. As mentioned, SNMP is also widely implemented on routers. Thus the network providers can implement this solution on their routers. The only thing that has to be done is to decide if the server is under attack. This process could be achieved using the aforementioned Ordered Fuzzy Numbers.

## **14.4 Attack Observation Using OFNs**

As has already been mentioned, the system administrator has the possibility to check how many and which users are already connected to the server. He or she is also a person who possesses the knowledge about the prime time of the day in which users usually work with the system. Another issue that could be checked is how many TCP SYN connections actually come to the server by attempts to establish a TCP session. The last area that could be checked by the proposed algorithm, as mentioned before, is router statistics of packet transmission. That complete set of information should be enough to decide whether the server is under attack. In the proposed algorithm, the administrator will not use the fact that the number of connections is growing. The method will measure the packet count during network operation based on router statistics provided by SNMP. In the proposed algorithm, the administrator should measure The specific packet count four times:

$$\left(t\_i, t\_{(i-1)}, t\_{(i-2)}, t\_{(i-3)}\right) \tag{14.1}$$

where *ti* is a current timeslot.

All four measures together give a fuzzy number in OFN notation where


This fuzzy number in OFN notation is presented in Fig. 14.2. This is a definition of fuzzy observance of a router.

**Definition 1** Fuzzy observance of an R router in time *ti* is a set

$$R/t\_i = \{f\_R(0)/t\_{i-3}, \, f\_R(1)/t\_{i-2}, \, \mathbf{g}\_R(1)/t\_{i-1}, \, \mathbf{g}\_R(0)\}/t\_i\} \tag{14.2}$$

where

$$\begin{array}{c} \left| t\_i > t\_{i-1} > t\_{i-2} > t\_{3-1} \right. \\ \left| t\_i - t\_{i-1} \right| = \left| t\_{i-1} - t\_{i-2} \right| = \left| t\_{i-2} - t\_{i-3} \right| = t\_n, \text{timeslot of the measurement} \\ f\_R(0) \le f\_R(1) \le g\_R(1) \le g\_R(0) \end{array}$$

This provides Lemma 1.

#### **Lemma 1**

$$\mathcal{R}\_{positive} = \begin{cases} f\_R(0) < f\_R(1) < g\_R(1) \\ or \\ f\_R(1) < g\_R(1) < g\_R(0) \end{cases} \tag{14.3}$$

*in other situations, Rnegative.*

**Fig. 14.3** The algorithm concept

According to this definition during router observance the counters should give:


The interpretation of these orders is presented in Fig. 14.3. Then the statistics collected on the routers are prepared and the appropriate counters give the results for preparing fuzzy numbers, and a fuzzy observance of the group of routers can be defined. Fuzzy observance of the group of routers is defined as

**Definition 2** Fuzzy observance of the group of routers is described by the formula:

$$S\_m = \sum\_{i=1}^n \left\{ \begin{matrix} R\_{positive} | R\_{negative} \\ R\_i \* w\_i | - R\_i \* w\_i \end{matrix} \right\}. \tag{14.4}$$

where *wi* ∈ {*wi,...,wn*} describes an impact on all routers.

This provides a possibility to define the situation when DDoS should be detected on the router:

**Definition 3** An attack on the router is detected in the following conditions:

*If Ri is positive AND Ri is negative THEN Attack* = *true*

where *Ri* is an order from the history of statistical results according to that router on the time of day of the observance.

According to this, the situation when DDoS could be detected on a group of routers could be defined as follows.

**Definition 4** An attack on a group of routers is detected in the following conditions. *If Sm is positive AND Sm' negative THEN Attack* = *true* where *Sm* is an order from the history of statistical results according to that group of routers on the time of day of the observance.

#### **14.5 Experiment Test Results**

In the following two subsections we provide descriptions of the test together with the results of attack detection by the proposed method.

#### *14.5.1 Test Description*

To test and prove the idea a special IP network was prepared. This test was inspired by the situation in Poland, when the Polish government attempted to sign the ACTA regulations. This situation caused a huge attack on Polish government websites. In consequence, those websites were blocked. The method of attack was very simple, because it was sufficient that many people tried to visit such websites which generated massive traffic to the servers. These servers were not prepared to manage so many connections exceeding their capacity. Finally the servers stopped responding to users' queries. Such a method of attack could be simulated in an easy way. Some simple tools could be found on the Internet [21]. One of them is DDOSIM, Layer 7 DDoS simulator [22]. This solution is provided with the source code, thus it is possible to analyze it and check how it works. In a real situation, the attacker has to collect an appropriate number of hosts that could be used as sources of the attack. Once she has them, the attack can be started. In the prepared simulation, it is enough to just run the DDOSIM program with the appropriate parameters. After that, this tool will generate the defined amount of connections to the defined IP address. To perform this test a special network with mesh topology (shown in Fig. 14.1) was prepared. The user hosts labeled from 1 to 5 were running DDOSIM software in the appropriate cycle. This station was equipped with an Intel i3 processor running under Windows 7 64 bit system control. But the DDOSM software was running on a virtual machine in a VMWare environment. That virtual machine was equipped with 512MB of memory and 1 processor and was running under Debian operating system control and the Web server was equipped with two Intel Xeon processors with a Windows 2008 server operating system. An Internet information service was started on the Web server. It was used to provide an HTTP server functionality. The routers R1 to R6 were Cisco 2600 series routes. To simulate the attack the DDOSIM software requested information from the Web server using a TCP connection in the following steps.


The cycle of simulation was prepared in the following steps and according to the following conditions.


This test provides a lot of data from the network node using files with whole IP packets from six places of the network. The database from this simulation including the traffic from all the connections can be downloaded from data resource page [23]. Additional packets that could be recognized in the collected database include the open shortest path first routing protocol which was running between routers as in ordinary networks [18, 23, 24]. In the network prepared for the simulation, to ensure better test conditions, no quality of service method was implemented. Also there was no firewall or IDS/IPS implemented in the network whereas it should normally be implemented [25–27]. This was because the authors claim that in a real network the packets which come from ordinary users are not treated as special packets. Moreover the Web servers should not be under any protection in order to check that the method of the attack is strong enough and the database collected could be treated as a valuable amount of data (Fig. 14.4).

#### *14.5.2 Attack Detection Using Proposed Method*

Statistics of packets have to be provided to use a proposed method for detecting attacks using OFNs. According to the collected database, the results could be calculated from sniffed packets, and this was done. There is a requirement for defining timeslots for which the statistics will be calculated. Those timeslots were defined to be one minute. Then the amount of packets directed to the Web server and that pass through the routers R1 to R6 was normalized by dividing by 1,000. The achieved results of this simulation are presented in Table 14.1.

**Fig. 14.4** Used network

**Table 14.1** Normalized packets count on routers during test


To calculate a sum described by Definition 2, the OFNs have to be defined by the statistics collected from the routers. In the timeslots *t*<sup>0</sup> the normalized value is 0. It means that all numbers are [0*,* 0*,* 0*,* 0]. Thus, accordingly:

$$S\_m = 0.\tag{14.5}$$

This has not got any order, but the results provide the information that there is no packet directed to the Web server, therefore there is no attack on it.

In the timeslot *t*<sup>1</sup> it is possible to provide the OFN with an approximation. This approximation could be made by providing the OFN with only two measurements and is utilized as a four-part number by using the values as follows.


In this situation the OFN for the routers 1 to 6 could be described as


Therefore the *Sm* = [0*,* 0*,* 2*.*5*,* 2*.*5] with positive order. Those results according to Definition 4 have to be compared with the historical results in the part corresponding to an appropriate day. In the performed simulation the results indicate that the Web server is under attack, but the probability of the attack is 50% because the OFN was prepared with the aforementioned approximation. In the timeslot *t*<sup>2</sup> it is still possible to provide the OFN only with an approximation. This approximation could be done by providing the OFN from only three measurements and used as a four-part number by making use of the following values.


In this situation the OFN for the routers 1 to 6 could be described as


Therefore *Sm* = [0*,* 2*.*5*,* 6*,* 6] with positive order. Those results according to Definition 4 have to be compared with the historical results in the part corresponding to an appropriate day. In the performed simulation the results indicate that the Web server is under attack, but the situation of the attack could be described with the probability of 75% because the OFN was also provided with an approximation. In the timeslot *t*<sup>3</sup> it is possible for the first time to provide the OFN without any approximation. It means that for the OFN four measurement results will be used as follows.


In this situation the OFN for the routers 1 to 6 could be described as



**Table 14.2** The sum calculation results


Therefore *Sm* = [0*,* 4*,* 7*.*5*,* 9*.*5] with positive order. Those results, as in previous timeslots, have to be compared with the historical results in the part corresponding to an appropriate day. In the performed simulation the results indicate that the Web server is under attack. Using Table 14.1 the OFN for each router in subsequent timeslots was defined and *Sm* was calculated. Those results are presented in Table 14.1. Obviously, the order was described and the decision about a possible attack was made. The timeslot of interest is *t*10. In this situation the OFN for the routers 1 to 6 could be described as


Therefore *Sm* = [14*.*5*,* 14*.*5*,* 14*.*5*,* 0] with negative order. Those results, as in previous timeslots, have to be compared with the historical results in the part corresponding to an appropriate day. In the performed simulation the results indicate that the Web server is no longer under attack. The same situation could be recognized in timeslot *t*11. In this situation the OFN for the routers 1 to 6 could be described as follows.


Therefore *Sm* = [14*.*5*,* 14*.*5*,* 0*,* 0] with negative order, which means that there is no attack recognized (Table 14.2).

#### **14.6 Conclusions-Method Comparision**

The presented method could be compared with the method proposed in the literature as provided in Table 14.3.

As shown in Table 14.3, the proposed method does not require an expert to define the rules of possible attack as in a system with fuzzy logic proposed in some papers [16, 17]. Such an expert would have to possess extended knowledge about security and IP networks. This is something that allows us to use the proposed method in a very quick way. The second thing is the manner of gathering results of the observance of a DDoS attack. In the proposed method, the decision about the attack is made using simple calculations provided by the OFN description. This allows achieving the results very quickly and easily. The methods found in the literature make decisions by comparing a list of rules [16, 17]. Of course there are some solutions that use mathematical models [28], but they are much more complicated than the method using OFNs. The last thing that could be compared is the possibility of being implemented in a real environment, which means in real networks. The method proposed in the literature requires a lot of processing power. The method proposed in this chapter requires only solving a simple mathematical equation. This is very important, because it lets us use the proposed method in a real network, on real routers.


**Table 14.3** Proposed and existing fuzzy method comparison

The presented new concept of detecting DDoS attacks was introduced using fuzzy numbers. As has already been mentioned, it consists in determining the server activity trend changes by specification of the direction of changes using OFNs. The test was performed on the real dataset collected in the prepared network. This dataset is about 2 GB in size, but the information about the possible attack could be achieved without utilizing a lot of CPU performance.

#### **References**


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Chapter 15 Fuzzy Control for Secure TCP Transfer**

**Łukasz Apiecionek**

**Abstract** This chapter presents the potential use of fuzzy observance implementation for detecting transmission problems that could appear in the near future. Using quick detection, appropriate action could be taken and the security and reliability of data transfer could be maintained at a high level. As a result the authors present a proposed solution for dividing a data stream between different data links and predicting transmission problems.

**Keywords** TCP · Multipath TCP · Security · Fuzzy logic · Fuzzy observation

#### **15.1 Introduction**

Nowadays many networks require security such as data encryption and reliable transfer to the destination. Health care, rail, and power plant systems are some examples of such systems. When they are used an operator cannot lose a connection between his or her control and management applications and system sensors and actuating equipment. In such a system a lost connection could have tragic consequences. In the case of power plants this could also mean some huge disaster. That is why security regarding reliable transfer is very important. In the case of health systems it could be required for monitoring people but also for execution of medical operations through remote control of medical equipment such as a scalpel. Some problems with rail equipment could cause a train accident. There are also many other systems in which a lost connection would cause real damage. Such systems are called critical infrastructure. For this critical infrastructure more than one connection is usually prepared. For example, those systems can operate using cable and a 3G/4G/LTE connection concurrently. Unfortunately, in most cases, different kinds of used connections are not operated simultaneously. Systems switch between them when the operating connection collapses. When the systems switch connections they can lose some data.

© The Author(s) 2017

P. Prokopowicz et al. (eds.), *Theory and Applications of Ordered Fuzzy Numbers*, Studies in Fuzziness and Soft Computing 356, DOI 10.1007/978-3-319-59614-3\_15

Ł. Apiecionek (B)

Institute of Technology, Kazimierz Wielki University, ul. Kopernika 1, 85-074 Bydgoszcz, Poland e-mail: lapiecionek@ukw.edu.pl

The loss of data can be very costly. In such systems there is much effort concerning appropriate data encryption. The systems are usually well protected against unauthorized access to the network [3, 10, 25, 40]. In most cases the data are encrypted before being forwarded to the communication transmission layer. The worst situation is when they lose their connection, as mentioned above. In order to ensure that the data reach their destination, transmission control protocols are used, but it could not be enough. When the connection collapses and the system switches to another one, the transmission of the lost packet has to be repeated [12, 13, 15]. In many cases, the system administrator does not know that use of more than one network connection can increase the transfer rate and security level of the data transfer process mentioned as reliability of the data transfer. How can it be achieved? In the situation when only one connection is used, a hacker can sniff all the packets of data in only one place on the network. Thus he or she could collect all the data and then try to decode them. After some time the real information can be recovered. When there is more than one network connection used, a hacker is forced to work on more spots to sniff the packets. More connection used in a parallel way could improve security because in this scenario, a hacker must be familiar with more than one transfer technology [11, 16, 22]. This chapter presents multipath transmission control protocols (MPTCP), which is currently ready-to-use technology. This technology can be used to achieve the aforementioned functionality. One of the huge advantages of MPTCP is the fact that it works at the operating system level. This makes it possible to use the existing application in a simple manner. MPTCP are presented with the three schedulers: the existing one, some secure proposition, and finally the one using Ordered Fuzzy Numbers (OFNs) for fast prediction problems in the transmission [20, 38, 60]. Such a presentation lets us introduce OFNs as a ready-to-use solution that could also be used in connection with other technology and solve some real problems in IP networks. The chapter is focused on OFN usage in already implemented technology such as MPTCP [26, 57, 62].

#### **15.2 Multipath TCP**

MPTCP uses the concept of transmission control protocols (TCP) [9, 24, 39, 50]. TCP transmission is used for delivering data between applications running on different machines on the network. TCP can be used to send data in both directions between two hosts using an established connection. A unique identifier is used to describe that connection. That identifier consists of two pairs of values (one for each side of the connection), IP and port number [5, 27, 28]. To achieve complete data and their appropriate order, checksums and sequence numbers are used. The mentioned data are shown in the TCP header presented in Fig. 15.1. When the application intends to establish a TCP connection, it has to exchange appropriate signals. This process is called a three-way handshake and is presented in Fig. 15.2. Host A sends a segment with a set SYN flag, then host B confirms the receipt of the packet and sends back SYN and ACK flags as a response. Finally, host A sends an empty segment, with


only the ACK flag as a response to the previous message [34–36, 50]. One possible problem with TCP is the process of changing network connections which is associated with changing an IP address into another one. When a host switches from an Ethernet cable connection to Wi-Fi, it is assigned a different IP address. This triggers a process of closing the existing TCP connections and resuming them. MPTCP is characterized by a set of extensions to the specification of the existing TCP. These extensions enable the client to establish more than one connection while they each use different network cards, yet they are all used to reach the same destination host. The fact that fault-tolerant and efficient data connections are maintained this way between hosts that are compatible with the already used network infrastructures can be regarded as a big advantage of MPTCP. A possible way of establishing connection using network A and B is presented in Fig. 15.3. Another MPTCP advantage is that it increases the throughput of data transfer. This approach should significantly improve congestion balance between network paths. Simultaneous enabling of MPTCP must not prevent connectivity on a path where regular TCP operates [33, 37, 53, 54]. As already mentioned, MPTCP is located at the transport layer and it is intended to be transparent to other layers: higher and lower ones, as presented in Fig. 15.4. MPTCP can be treated as an additional function of higher layers of the TCP standard.

When a new connection of MPTCP should be established, a three-way handshake algorithm of TCP is used. This is presented in Fig. 15.5. The protocol is enhanced by a new feature that makes the difference as compared to standard TCP.

The MP\_CAPABLE option informs both hosts if the MPTCP connection can be established and if the data can be transmitted. The IP networks encompass many routers and switches working as intermediate boxes. Those boxes could complicate the process of establishing connections. For this reason it is insufficient to identify the connection pair (IP address and port number) of the source and destination hosts. MPTCP has extended TCP functionality by adding another option called MP\_JOIN. This option is used for generating a new subflow of data. The process of adding a new subflow is presented in Fig. 15.6.

The process of adding a new subflow is done in the following steps.

• In the first step the MP\_JOIN option provides a token generated with the key (truncated hash of the key) created during the initial connection.


Once the connection is established each host can send data over any of the subflows. Furthermore, Fig. 15.7 presents the data transmitted over one subflow. If, for example, a packet numbered 4 and 7 is lost it can be retransmitted to another subflow to recover the loss. Finally all the data packets reach the destination. There is a 'subflow sequence number' in standard TCP that supports the reception of a single subflow and ensures detection of any data loss. MPTCP uses "data sequence number" to sort the received data before passing them to the application [23, 51, 52, 55]. The MPTCP header is presented in Fig. 15.8. To inform the destination that the source has no more data to send, the source sends "Data FIN" signals. Its operation is exactly the same as a TCP FIN in standard TCP implementation.

#### **15.3 Multipath TCP Schedulers**

Three schedulers are presented in the next three subsections: standard, secure, and with OFN usage.

#### *15.3.1 Multipath TCP Standard Scheduler*

In general, ordinary users who are connected to the Internet by their smartphones via Wi-Fi or a 3G network do not use these connections concurrently. They use them in series. The MPTCP is able to use both at the same time as shown in Fig. 15.9. If the standard TCP connection fails for some reason, it must be re-established. With MPTCP such a situation can be avoided by dynamic switching to the link. Therefore the user can avoid wasting time re-establishing connections. It enables the optimum data transfer rate selection.

The first mobile system that supports MPTCP [3, 31, 32, 56] is iOS 7. It ensures an uninterrupted transfer in case of failure of one connection or when the connection is aborted. At the moment, MPTCP is used in iOS 7 only for transfer of Siri data. Siri is an intelligent personal assistant for smartphone users. Such a system of scheduling connections was originally proposed by MTCP authors.

#### *15.3.2 Multipath TCP Secure Scheduler*

Another possible MPTCP scheduler is a secure scheduler. As follows from the literature, MPTCP is able to increase the security level of the transmitted data by application of many different links to reach the destination. This solution is contrary to the present methodology, which is based only on network protection and [1, 2,

**Fig. 15.10** Mixing data process

14, 17, 18, 61] on network access control [7, 8, 29, 30, 58]. This scheduler treats the transmitted IP packets as raw binary data, which can be divided into blocks and then passed to the transmission layer. As regards data protection from being sniffed by a hacker, the scheduling algorithm consists of the steps:


The process of dividing the data into blocks, assigning a special DSN (data sequence number) to it, and putting it in a random sequence (Steps 2 and 3), is shown in Fig. 15.10. Step 5 of the proposed algorithm is presented in Fig. 15.11. The data passed to the MPTCP socket is transmitted using different data connections in a parallel way. In the vulnerable spots, where the data can be sniffed, a hacker is able to get only a portion of transmitted data. These data do not carry any clue as to what part of the original data they are [4, 6, 41].

The process of mixing the original data blocks uses random sequence and is performed on the sender's side, whereas the information about the appropriate sequence is passed to the receiver's side using the DSN.

## *15.3.3 Multipath TCP Scheduler with OFN Usage*

As already mentioned above, MPTCP can increase network security regarding such parameters as a destination reachability and network reliability [42, 43, 48]. For any mentioned scheduler, a transmission error can occur at the used channel. The error can cause a need for data retransmission over the same channel, or if the number of errors grows, the channel can be closed and another connection used. Use of OFNs can increase the time of the data transmission link change or can decrease the number of retransmissions. OFNs can be used for predicting data loss in the used channel and may accelerate the decision on some changes such as quicker retransmission of packets or use of a different channel [45–47].

#### *15.3.4 OFN for Problem Detection*

An algorithm has been proposed for OFN use for detecting future problems in the used connection [19, 21, 44, 49, 59]. For this purpose the algorithm should measure a TCP retransmission in all used channels during the transmission as a percentage value of transmitted packets (during the given timeslot). This measurement should be continuous and statistics should be taken for specific timeslots. Four timeslots of a continuous measurement can be defined as follows.

$$\{t\_i, t\_{(i-1)}, t\_{(i-2)}, t\_{(i-3)}\} \tag{15.1}$$

where *ti* is a current timeslot.

All four measurements together make up a fuzzy number in OFN notation where


That fuzzy number in OFN notation is presented in Fig. 15.12. This is a definition of a fuzzy observance of a connection.

**Definition 1** Fuzzy observance of *C* router in time *ti* is a set

$$\mathbf{C}/t\_{i} = \{f\_{\mathcal{C}}(\mathbf{0})/t\_{i-3}, f\_{\mathcal{C}}(\mathbf{1})/t\_{i-2}, \mathbf{g}\_{\mathcal{C}}(\mathbf{1})/t\_{i-1}, \mathbf{g}\_{\mathcal{C}}(\mathbf{0})\}/t\_{i}\}\tag{15.2}$$

where

$$|t\_i - t\_{i-1}| = |t\_{i-1} - t\_{i-2}| = |t\_{i-2} - t\_{i-3}| = t\_n \text{, timeslot of the measurement}$$

$$f\_C(0) \le f\_C(1) \le g\_C(1) \le g\_C(1) \le g\_C(0)$$

This provides Lemma 1.

**Lemma 1**

$$\mathcal{C}\_{positive} = \begin{cases} f\_{\mathcal{C}}(\mathbf{0}) < f\_{\mathcal{C}}(\mathbf{l}) < \mathcal{g}\_{\mathcal{C}}(\mathbf{l}) \\ or \\ f\_{\mathcal{C}}(\mathbf{l}) < \mathcal{g}\_{\mathcal{C}}(\mathbf{l}) < \mathcal{g}\_{\mathcal{C}}(\mathbf{0}) \end{cases} \tag{15.3}$$

*In other situations Cnegative.*

According to this definition, during observance of connections the counters should give:


The interpretations of those orders are presented in Fig. 15.13. Then the statistics collected at each connection provide results for fuzzy number preparation. Fuzzy observance of the MPTCP connections can also be defined. Fuzzy observance of the MPTCP connections is defined as follows.

**Fig. 15.13** Order interpretation in OFN notation

**Definition 2** Fuzzy observance of theMPTCP connections is defined by the formula:

$$S\_m = \sum\_{i=1}^n \left\{ \begin{matrix} R\_{positive} | R\_{negative} \\ R\_i \* w\_i | - R\_i \* w\_i \end{matrix} \right\}. \tag{15.4}$$

where *wi* ∈ {*wi, ...,wn*} describes an impact on all connections.

This makes it possible to define the MPTCP scheduler with OFNs.

#### **15.4 OFN Scheduler Algorithm**

An algorithm proposed as OFNs used for transmission error anticipation consists of the following steps.

Step 1. Administrator declares *wi* and *Li* for all used connections, where *wi* describes an impact on all connections, and *Li* describes the load of all data that should be sent by those connections when the transmission starts. *Li* should be provided as a percentage value.

Step 2. The amount of packets *Pi* that will be transferred over each connection for each timeslot is calculated using the formula:

$$P\_i = \frac{L\_i}{\sum\_{i=1}^{n}} \ast Data \tag{15.5}$$

Step 3. During the transmission *Ci* is calculated for each connection according to data retransmissions and *Si* is calculated according to the given definition.

Step 4. When the calculated *Si* is positive and exceeds the acceptance level *AL*, there is an error increase detected on this connection. In this situation *Li* for a given connection will be changed according to the formula:

$$L\_i = \frac{L\_i}{ErrorCorector} \tag{15.6}$$

When the calculated *Si* is negative, there is an error decrease detected on this connection. In this situation *Li* for a given connection will be changed according to the formula:

$$L\_i = L\_i \* ErrorCorector \tag{15.7}$$

The *ErrorCorector* is a value that describes how quickly the system should stop using a given connection in which the amount of errors has increased. This value should also be provided by the network administrator.

#### **15.5 Simulation Test Results**

To check a MPTCP scheduler with OFNs, some simulations were made. The system has got two connection links. Connection 1, labeled C1, was a Wi-Fi connection with maximum rate of 11Mbit/s. The second connection used, labeled C2, was an LTE connection with the maximum rate of 5Mbit/s. The parameters of the algorithm were:


The results obtained by the applied algorithm according to load balancing between connections during data transfer are presented in Table 15.1. There were errors on measured data links and the OFN was calculated according to the presented algorithm. The number of packets transferred over each link was modified according to the level of errors and OFN order. When the percentage of errors increased, the number of packets passed to the link with problems (C2) was decreased. Obviously, the OFN was calculated after four timeslots.

Table 15.2 shows the number of packets passed to the connections and the number of packets that had to be retransmitted due to an error on the link when the MPTCP with and without the OFN algorithm was used. Note that the percentage of errors on the C2 link decreased. That is why there were fewer packets transferred during the network problems. The number of errors on the C1 connection increased because there were more packets transferred through this link. The most important column is a sum of errors in both links. When the algorithm decreased the number of packets passed through the C2 link, the sum of errors decreased even if the number of errors on the C2 link increased. The final results prove that the number of errors in the transmission can be decreased using OFNs in the MPTCP scheduler.


**Table 15.1** Normalized packets count on routers during test

**Table 15.2** Number of packets and errors during the transmission


## **15.6 Conclusions**

The new concept of an MPTCP scheduler using OFNs presented herein was tested during a data transfer simulation. As shown in the previous section, with the proposed algorithm it is possible to decrease the retransmission count. This could be achieved because there were fewer packets transferred over the connection link where some problems were detected. This is a potential use of OFNs in a simple way intended to improve existing solutions such as MPTCP without complicated algorithms that require a great deal of processor capacity. The other advantages of using an OFN scheduler are that it could be connected with the presented secure scheduler and coexist on the transmissions. Such solutions present the huge potential of OFNs.

## **References**


on Intelligent Media Technology for Communicative Intelligence, Warsaw, POLAND, 13–14 September 2004 (2004)


R., Zadeh, L., Zurada, J. (eds.) Artificial Intelligence and Soft Computing. Lecture Notes in Computer Science, vol. 7894, pp. 365–375. Springer, Berlin (2013). doi:10.1007/978-3-642- 38658-9\_33


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Chapter 16 Fuzzy Numbers Applied to a Heat Furnace Control**

**Wojciech T. Dobrosielski, Jacek M. Czerniak, Hubert Zarzycki and Janusz Szczepa´nski**

**Abstract** This chapter presents a trend phenomenon and application of the fuzzy controller for Ordered Fuzzy Numbers (OFNs). The authors propose to use a trend in a combustion process for a simplified model of a solid fuel fired furnace. Better control over the process translates into reduced *CO*<sup>2</sup> emission as well as optimal use of the furnace. When carrying out the fuzzy observation of the efficiency of the furnace, the authors apply the OFN notation by connecting the trend of furnace temperature changes with the order appropriate for this notation. Thanks to this approach it is possible to enhance information without the additional need to multiply the transmitted data. It is particularly effective in the multidimensional fuzzy observation when monitoring not only the condition of the temperature in the furnace but also the ambient temperature and the temperatures in several rooms of the heated building. The chapter is a continuation of a series of papers published by the authors on multidimensional fuzzy observation using OFN notation. A controller in the conventional fuzzy logic approach is also presented in the chapter. The controller was built using jFuzzyLogic software. The fact that there are more and more OFN applications seems to be a good predictor of the development of this generalization, an example of which is the problem analyzed in this chapter.

J.M. Czerniak e-mail: jczerniak@ukw.edu.pl

H. Zarzycki

J. Szczepa ´nski Institute of Fundamental Technological Research, Polish Academy of Sciences, ul. Pawinskiego 5B, 02-106 Warsaw, Poland e-mail: jszczepa@ippt.gov.pl

W.T. Dobrosielski (B) · J.M. Czerniak

Kazimierz Wielki University, Institute of Technology, ul. Chodkiewicza 30, 85-064 Bydgoszcz, Poland e-mail: wdobrosielski@ukw.edu.pl

University of Information Technology and Management Copernicus, ul. Inowrocławska 56, 53-648 Wrocław, Poland e-mail: hzarzycki@yahoo.com

**Keywords** Adaptive systems · Ordered Fuzzy Number · Inference · Defuzzification · Fuzzy hardware · Fuzzy software · Fuzzy control

#### **16.1 Introduction**

The development of civilization is associated with an increase in energy demand. In modern times a variety of technologies is used for generating electricity. Nuclear power is one of these technologies supposed to solve the problem of energy shortage. Assumptions proved to be wrong, as for the atom and other fuels [59]. People should look for alternatives. An important factor in obtaining energy is the amount of carbon dioxide produced, which contributes to climate change. It is assumed that it is impossible fully to eliminate fuel combustion resulting in carbon dioxide. Reducing emissions of *CO*<sup>2</sup> in industrial processes is the optimal solution with regard to the interests of individual countries. The main activities that can reduce *CO*<sup>2</sup> emissions include reduction of energy consumption, but significant reduction seems unlikely. There is also the possibility of increasing the use of carbon-free renewable energy sources such as solar, wind, hydropower, and geothermal resources [59]. Increasing the efficiency of energy conversion to useful energy, as the last element affecting the reduction of *CO*<sup>2</sup> is a proposal the authors intend to develop based on the capabilities of artificial intelligence, in particular based on fuzzy logic. According to the authors the possibility of such process control, which improves combustion efficiency, whether in domestic or industrial stoves, and will reduce emissions of harmful compounds, is remarkable. The combustion process is a chemical reaction of oxidation that takes place between fuel and oxygen. The result is an exotherm and the formation of flue gases. The general process of burning coal is shown in a simplified chemical formula below.

$$C + O\_2 \rightarrow CO\_2 + released\ heat\tag{16.1}$$

The highest combustion temperature is obtained using the least amount of oxygen at which there is no free oxygen in the exhaust gas. In other words, the idea is that all the ingredients are oxidized to *CO*2, *H*2*O*, *SO*2. Oxygen-enriched combustion lowers the temperature giving a cooling effect. Combustion with oxygen depletion also reduces the temperature, thereby contributing to a partial combustion of the fuel. In contrast, a process that is desirable according to the literature [37] is called a stoichiometric process. The mixture in this embodiment is burned completely and exhaust gases contain neither fuel nor oxygen. Ensuring proper combustion, which depends on many factors (e.g., the calorific value of the fuel, the construction and function of the stove), may be a difficult control problem. Redefining Eq. 16.1 as the basic equation describing the relationship between the combustion components is represented by Eq. 16.2.

$$\frac{100}{CO\_2} \ast [CO\_2] + \frac{100}{21} \ast [O\_2] + \left[\frac{100}{CO\_2} - \frac{79}{21}\right] \ast [CO] = 100\tag{16.2}$$

Equally Eq. 16.2 can be represented as an Ostwald graph [63], where this relationship for lignite is shown in Fig. 16.1. Using this graph allows regulation of the combustion process. When the measuring point is on the line between the axes of the carbon dioxide and oxygen, the carbon monoxide content is 0%. If a point is above the line it means that an error has occurred. The situation when the point is below the line in the combustion means that there is incomplete combustion and in the exhaust gas there is carbon monoxide in addition to carbon dioxide. Accordingly, Fig. 16.1 shows a coefficient λ, which is expressed as φ. The general model of the stove on solid fuel for the purpose of this work is shown below Fig. 16.2. The diagram shows the essential elements, which are discussed later. Imprecision of factor borders accompanying the combustion process has contributed to the use of fuzzy logic. This is confirmed by numerous publications, where examples of the work are [30, 56]; especially important in the context of this article there is the study by [56]. Depicting a fuzzy system of monitoring carbon dioxide in the combustion process is a Takagi-Sugeno inference model [62]. Combining fuzzy logic with any process or phenomenon, in which we use a linguistic description of reality is a broad field of research. Lotfi A. Zadeh can be considered the creator of fuzzy logic. In 1965 this American professor published an article "Fuzzy Sets" [65] in the journal, Information and Control, defining the notion of a fuzzy set, where inaccurate information is described by values from the interval (0, 1).

**Fig. 16.2** Indicative graph of a solid fuel stove

It can also be said that the precursor of Zadeh's achievements is the Polish mathematician Jan Łukasiewicz, who in the 1950s published an article on three-valued logic [39]. The formulation of the foundations of fuzzy logic and the involvement of the scientific community have contributed to the creation of many theories expanding this subject. One of them is the representation of the L-R fuzzy set. The authors Dubois and Prade in [16] introduced the limited membership functions of the two functions of the shape of L and R. The linear shape function operations on the numbers L-R gave the partial opportunity to reproduce results for the triangular membership function. In the case of multiplication, the resulting number of L-R led to enlarging the range introducing imprecise intervals.

We now depart from the genealogy of fuzzy logic development to address again the original problem, the process of controlling the stove on solid fuel. The authors' inspiration to write this chapter was that the combustion process can benefit from the trend. The trend is visible when the stove water temperature rises to a specified level; the upward trend may be shaken by the excess of supplied oxidant. Oxygen contained in the exhaust gases and the quantitative composition result in the combustion process. For example, reaching the required water temperature during firing of the stove is associated with the fan modulation to 80–100% of power and leads to too lean a mixture. The effect of an excessive amount of oxidant is the cooling of the heat transfer medium. The water temperature decreases instead of increasing. Temporary and long-term ups and downs translate into the trend of the process [7–9, 11–15]. Another example might be the work of [6, 21, 38, 41–43, 57, 58], in which the authors use the trend as a direction in the problems of management accounting and in determining the internal rate of return (IRR) for investment or other issues of recognition attack computer networks described in [1–4], and also when talking about engineering solutions [7–14, 44–49, 60, 61, 68]. The opportunity to study the behavior of phenomena expressed as a trend in fuzzy logic is possible thanks to directing as proposed by the team of Professor W. Kosi ´nski. The authors' proposal [34] concerns the redefinition of fuzzy numbers as directed fuzzy numbers OFNs (Ordered Fuzzy Numbers), where the main advantage is the ability to solve a linear equation 16.3.

$$A + B = C\tag{16.3}$$

*where* A, B are any Ordered Fuzzy Numbers for which the following equality should occur.

$$A = C - B \tag{16.4}$$

In the case of using numbers proposed by Dubois and Prade, Eq. 16.4 will be false. This is because of fuzzy number imprecision expansion. Using OFNs enables easyto-perform arithmetic operations on them and on the real numbers. In addition, one can use direction as the trend of the process.

#### **16.2 Selected Definitions**

#### *16.2.1 The Essence of Ordered Fuzzy Numbers*

The basic concept of Ordered Fuzzy Numbers has been described in the introduction. In this chapter a deeper concept of OFNs is presented. This is essential for understanding the solutions used in the chapter. The authors of OFN are the team of Professor W. Kosi ´nski, P. Prokopowicz, and D. Sle ´ ˛zak [31–36, 51–55]. The problem of increasing imprecision with the increasing number of performed operations and the lack of solutions to Eqs. 16.3 and 16.4 in fuzzy logic has been noted by the authors. Redefining classic fuzzy sets, which is according to Zadeh to postulate an ordered pair, expanded the definition of an ordered pair of functions. The number is defined there as follows.

**Definition 1** Ordered Fuzzy Number A is an ordered pair of functions

$$A = (\mathbf{x}\_{up}, \mathbf{x}\_{down}) \tag{16.5}$$

where *xup*, *xdown* : [0, 1] → *R* are continuous functions.

These functions are called, respectively, the up- and down-parts. These two parts are connected via a constant function equal to 1 on the interval. The direction of a fuzzy number is called the orientation: the up-part of the OFN is the beginning and the down- part is the end of this number. A graphic interpretation of Ordered Fuzzy Numbers is presented on the left side of Fig. 16.3, and the right side is the directed number with a reference to classical fuzzy numbers.

**Fig. 16.3 a** OFN example, **b** OFN presented with a reference to classical fuzzy number, and **c** simplified mark denoting the order of inverted functions

**Fig. 16.4** Schematic diagram of the fuzzy controller

#### *16.2.2 Fuzzy Controller*

The formulation of fuzzy controller mathematical foundations can be found in the literature [28, 29, 40, 64, 66, 67]. These subject-related concepts using linguistic variables assume the role of describing input and output states, which we intend to express and assess a linguistic description. Linguistic value directly affects the verbal assessment of the linguistic object. For example, the linguistic variable "voltage" takes the linguistic values of "small, medium, and high." The process of fuzzy control is shown in Fig. 16.4, which includes operations such as fuzzification, inference, and defuzzification. The fuzzification operation is carried out in the first stage. It is associated with the calculation of the degree of membership to particular fuzzy sets. In the inference stage, based on the input degree of membership we calculate the resulting membership function. An important conclusion is that the expected outcome is to define the system resulting in the membership function. Both fuzzification and inference operations contain a number of specific elements.

The closing operation of the system is the defuzzification block. It is characterized in that the output is a specific (not fuzzy) value. This value is the product of the method operating on the resulting membership function and enables the activation of the actuator in the desired manner.

Defuzzification is therefore a function that assigns a crisp value to a fuzzy number. There are several well-described fuzzification functionals, which are utilized in many arithmetics used in fuzzy logic, including the following.

#### **FOM: First of Maxima**

The FOM method is a method of selecting the smallest element of the set *A* kernel, where the fuzzification value is described in Eq. 16.6.

$$FOM(A) = \min \, core(A) \tag{16.6}$$

#### **LOM: Last of Maxima**

Accordingly selecting the highest value of the set *A* kernel, we use the LOM method; the formula is as below:

$$LOM(A) = \max \, core(A) \tag{16.7}$$

#### **MOM: Mean of Maxima**

Equation 16.8 shows the use of LOM and FOM as a method for which the fuzzification value includes the minimum and maximum elements of the *A* fuzzy set kernel. This value is the average of these two methods.

$$MOM(A) = \frac{\min \, core(A) + \max \, core(A)}{2} \tag{16.8}$$

#### **RCOM: Random Choice of Maxima**

The method is also called kernel fuzzification because the fuzzification value is always contained in the kernel of a fuzzy set. The fuzzification value of this method is a random element *x* ∈ *core*(*A*) calculated as the probability of:

$$RCOM(A) = P(\mathbf{x}) = \frac{\lambda(\mathbf{x})}{\lambda(core(A))}\tag{16.9}$$

where λ is the Lebesgue measure in universe *X*.

#### **MOS: Mean of Support**

This method shows the fuzzification value is the average of the *A* number medium.

$$MOM(A) = \frac{supp(A)}{2} \tag{16.10}$$

#### **COG: Center of Gravity**

This is the most common method in cases where it is important to determine the center of gravity of the considered system. In the fuzzification process of an *A* fuzzy number, the COG method is expressed as Eq. 16.11.

276 W.T. Dobrosielski et al.

$$COG(A) = \frac{\int\_{a}^{b} \mathbf{x} \mu\_{A}(\mathbf{x}) d\mathbf{x}}{\int\_{a}^{b} \mu\_{A}(\mathbf{x}) d\mathbf{x}} \tag{16.11}$$

#### **BADD: Basic Defuzzification Distribution**

The method of fuzzification was proposed in [20] as an extension of the COG and MOM methods. The fuzzification value of the fuzzy set *A* is obtained as

$$BADD(A) = \frac{\int\_a^b \mathbf{x} \mu\_A^\mathcal{V}(\mathbf{x}) d\mathbf{x}}{\int\_a^b \mu\_A^\mathcal{V}(\mathbf{x}) d\mathbf{x}} \tag{16.12}$$

It is also worth paying attention to the methods dedicated to OFN arithmetic, which are inherently sensitive to directing. These include: Fuzzification method called the **Golden Ratio (GR)**: It was established as a result of implementation of an ancient division used in Greek architecture. The GR value for the fuzzy number *A* is given by the equation:

$$GR(A) = \begin{cases} \min(\sup(A)) + \frac{|\sup(A)|}{\Phi}, \text{if } order \ (A) \text{ is positive} \\ \max(\sup(A)) - \frac{|\sup(A)|}{\Phi}, \text{if } order \ (A) \text{ is negative} \end{cases} \text{(16.13)}$$

where *G R* is the defuzzification operator, *supp*(*A*) is support for fuzzy set *A* in universe *X*, and Φ = 1,618033998875... .

**Mandala factor (MF)** method: This is the calculation of the value using the Mandala factor Ψ*<sup>A</sup>* sum of function integrals of a rising edge, falling edge, and a core set. The resulting value is scaled from the center of the coordinate system by adding it to the beginning value of a fuzzy number support set. When fuzzification is carried out in OFN arithmetic, in the case of a positive directing procedure described as above, and in the case of negative directing a calculated negative value should be subtracted from the first coordinate of an OFN number being the OFN number support right edge.

$$MF(A) = \begin{cases} c+r \text{, if } order \text{ (A) is positive} \\ c-r \text{, if } order \text{ (A) is negative} \end{cases} \tag{16.14}$$

*where*

$$r = \frac{1}{d-c} \int\_{c}^{d} \mathbf{x} \, d\mathbf{x} - \frac{c}{d-c} \int\_{c}^{d} d\mathbf{x} + \frac{f}{f-e} \int\_{f}^{e} d\mathbf{x}$$

$$-\frac{1}{f-e} \int\_{e}^{f} \mathbf{x} \, d\mathbf{x} + \int\_{d}^{e} d\mathbf{x} \tag{16.15}$$

Modified center of gravity: This is the result of modifications introduced by Kosi ´nski and Bednarek [5] in the classical COG method in order to adapt it to work in OFN arithmetic.

**Fig. 16.5** Graphical representation of selected fuzzification functionals for the same OFN number directed **a** positively and **b** negatively

$$\begin{aligned} \Psi\_{COG}(\xi, f, g) &= \frac{\int\_0^1 (\xi g(\mathbf{s}) + (1 - \xi)f(\mathbf{s})) |g(\mathbf{s}) - f(\mathbf{s})| ds}{\int\_0^1 |g(\mathbf{s}) - f(\mathbf{s})| ds}, \\ \text{if } f(\mathbf{s}) \neq g(\mathbf{s}) & \end{aligned} \tag{16.16}$$

$$\Psi\_{COG}(\xi, f, g) = \frac{\int\_0^1 f(s)ds}{\int\_0^1 ds}, \text{ if } f(s) = g(s) \tag{16.17}$$

Figure 16.5a, b are drawings showing different fuzzification results for the same OFN directed positively in Fig. 16.5a, and directed negatively in Fig. 16.5b. Calculations were performed using selected fuzzification functionals.

#### *16.2.3 Control of the Stove on Solid Fuel*

Referring to the example of the stove fuzzy controller, a diagram of such a system is shown in Fig. 16.6, where *S*1 is a heater temperature sensor, *S*2 a temperature or exhaust lambda sensor, and *S*3 an optional gas analyzer. The stove uses an air blower. In this example it is called a blower regulator *R*1. The basic concept of the work of the control system is as follows. Input variables that were selected are:


Output variables are:

• Speed of the blower

There are additionally provided auxiliary variables for the solution, *T z*, set temperature, which says what temperature the user prefers, or what temperature is optimal for a particular stove. For example, the OFN describing set temperature *T Z*1 = [56, 56, 56, 56] informs the controller to "hold temperature of 56" For the number *T Z*2 = [56, 58, 60, 72] the directing means, "I prefer temperature 72, but may be no less than 56." For the reverse OFN number there is the statement, "I prefer 56, but nothing will happen if it is 72."

Linguistic variables selected for this problem depend on the concept of the control operation. For example, the observed coil temperature is lower than the preset temperature. The stove driver starts the blower and observes the flue gas temperature or λ probe. In both cases, the sensors provide information about the progress of the operation of the stove. Based on this information, the controller determines the amount of air sent by the blower.

#### **16.3 Classic Fuzzy Controller**

The controller in the classic use of fuzzy logic was done using jFuzzyLogic. The technical details are available at http://jfuzzylogic.sourceforge.net. The input linguistic variables as described in the previous chapter are provided as fuzzy sets. Accordingly, we have Figs. 16.7 and 16.8.

**Fig. 16.7** Input variable 'coil temperature' and its fuzzy set

**Fig. 16.8** Input variable 'lambda' and its fuzzy set

**Fig. 16.9** Output variable 'power' and its fuzzy set

The output variable in the example is the power of the blower regulator. Figure 16.9 shows a membership function of this variable.

On the basis of expert knowledge concerning the combustion process a set of rules used by the controller was created. Different rules express the state of the process as a set of conditions and the effects that are recommendations for change. *RULE 1:* **IF** Tw **IS** low **AND** lambda **IS** rich **THEN** power **IS** power\_100; *RULE 2:* **IF** Tw **IS** low **AND** lambda **IS** optimal **THEN** power **IS** power\_60; *RULE 3:* **IF** Tw **IS** low **AND** lambda **IS** poor **THEN** power **IS** power\_20;

#### **16.4 The Controller for the OFNs**

The controller operation of the directed OFNs requires the use of up and down borders, which are formulated as

$$
\mu\_A(l\_A) = 0, \ \mu\_A(l\_A^-) = 1, \ \mu\_A(l\_A^+) = 1, \ \mu\_A(p\_A) = 0 \qquad (16.18)
$$

A graphical interpretation is shown in Fig. 16.10, in which the Ordered Fuzzy Numbers are marked with characteristic border points. Generally it can be assumed that each of the Ordered Fuzzy Numbers can be described by four real numbers:

$$A = (l\_A, l\_A^-, l\_A^+, p\_A) \tag{16.19}$$

In a classic fuzzy controller the resulting membership function is generally a not convex fuzzy set. The use of existing t-norm operators in the inference process will not help to create an OFN according to border points [65]. In [50] there is a proposal which says that instead of t-norm, algebraic operation of multiplication can be used. This is illustrated in Fig. 16.11. A sample controller for OFNs, in particular the inference block and a way to calculate the degree of activation amounts to the

**Fig. 16.12** Addition of two OFNs

operation presented above. Having calculated degrees of compliance with each of the rules, an OFN controller can start to cumulate into a single set which is the result. In a classic controller there are s-norm operators. In the controller for OFNs there will be the arithmetic operation of addition. For example, for an ordered number A, B, which is a product of aggregation, addition is shown in Fig. 16.12.

#### *16.4.1 Directed OFN as a Combustion Trend*

Linking the trend with the directing is associated with reaching the objective of a certain state. In the case when the water temperature of the stove is low, the OFN describing this variable should be positive: Fig. 16.10a, which seeks directing to the boundary point μ*A*(*pA*) = 0. Selecting "down" of the OFN emphasizes what value the OFN is going to achieve. For example, the stove water temperature can be a linguistic variable, as shown in Fig. 16.13. A fuzzy number *A* indicates that the

**Fig. 16.13** Fuzzy set of input variable 'coil temperature' according to the OFN

**Fig. 16.14** Fuzzy set of input variable λ according to the OFN

water is cool but tends to a higher temperature, whereas the number *B* informs us of the optimum state with a downward trend. The number *C* is specified for high temperatures, which should not be achieved.

The second variable is the information on the air excess in the exhaust, Fig. 16.14, which is the λ ratio. A number says that the mixture is rich and has a small amount of oxidant. In this case the trend as the directing is trying to strive for the *B* number. Number B describes a mixture where the composition is stoichiometric, that is, everything is burned, causing high efficiency, and the number *C* contains information about a large amount of oxygen in the exhaust gas and lean fuel mixture. Directing of number *C* tends to the desired state, which is determined by the *B* number.

#### **16.5 Modeling Trend in the Inference Process**

The basis for the construction of a fuzzy controller for OFN, according to the assumption that the number is located within the limits of OFN arms (see Fig. 16.7), is the reconstruction of an inference apparatus in such a way that the resulting product that is the function was the OFN. The proposal of such a construction is shown in this section, where the expert has a method of modeling the direction of the OFN. In the first stage we can say that the output fuzzy set is the CFN convex number. As an example, it is Fig. 16.15 showing the output variable of a blower regulator power. The *D* number covers the entire range of the blower controller operation. Directing this number at this stage is not established, because this is a convex fuzzy number. In contrast, expert judgment is expressed in the set of rules as a degree of compliance with the rule, that is, a percentage of the convex CFN. For example, evaluation of +20% is shown in Fig. 16.16. The number of *D* was reduced by 20% on the figure's left side. In contrast, expert judgment −20% reduces the vehicle from the right side; this case is shown in Fig. 16.17. For example, having two linguistic variables Tw and λ,


**Table 16.1** Rules for inference process

**Fig. 16.15** Fuzzy set of output variable 'power' according to CFN

taking into account expert judgment expressed as the degree of compliance with the percentage share of the output number, a set of rules will form as in Table 16.1. Signs in front of the percentages can be interpreted as the imposed direction to CFN from Fig. 16.15. In other words, modeling the trend in the inference process is reduced to the use of OFNs in the form of CFNs as shown in Fig. 16.15. The result of running the rules is imposed orientation: positive when we have a plus, and negative when we have a minus. Accordingly, for Fig. 16.15 it will be Fig. 16.18, For Fig. 16.17, we have directing presented as in Fig. 16.19. The added value of this solution is the ability to regulate the OFN direction at the inference stage. The percentages given by an expert can be regarded as a temporary modification. Directing of OFNs will be established when we accumulate all the rules. The established resulting OFN will allow us to go into the process of defuzzification. Another feature of this solution is the ability to reduce the surface area of the OFN. This feature can be particularly important from the perspective of defuzzification. Using the method of defuzzification associated with the surface area narrows the result already at the inference stage.

#### **16.6 Conclusions**

Handling of the Ordered Fuzzy Number in engineering applications is an alternative to convex fuzzy numbers. Meeting this task entails building an ordered fuzzy controller, which uses directing. In the context of this chapter 'ordered' expresses the trend of the studied phenomenon. And trend describes the tendency of a given variable. With the construction of a classic controller the authors introduced a variable associated with the increase in temperature per unit of time. The observed increase would allow determination of the short-term changes in water temperature. The use of OFN enabled following the trend in every other variable describing the combustion process. Returning to the main thread of the work, the aim of which was to use the trend in the combustion process, the authors focused on the inference process. The ability to model the directing of the OFN, which can be seen in the penultimate section, expands the possibilities of using the trend. Applying this approach will emphasize the trend in the inference process. By manipulating the percentage value of the medium of the output OFN, we received a modification of the resulting function. The use of this manipulation can be helpful when we want to change directing or reduce the OFN medium. Reducing the medium of a number, that is, fuzzification process input information, and applying methods such as MCOG, MF, or GR [15] sensitive to directing contribute to a better reflection of the process trend.

#### **References**


#### 16 Fuzzy Numbers Applied to a Heat Furnace Control 285


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Chapter 17 Analysis of Temporospatial Gait Parameters**

**Piotr Prokopowicz, Emilia Mikołajewska, Dariusz Mikołajewski and Piotr Kotlarz**

**Abstract** Locomotion in post-stroke patients may be severely compromised. Assessment and treatment of gait disorders after stroke are crucial. Scientists and clinicians still look for more effective diagnostic and therapeutic tools. The aim of the study was to assess a new fuzzy-based tool for measurement of observed gait parameters (velocity, cadence, and stride length, and their normalized values), both in healthy people and post-stroke patients.

#### **17.1 Introduction**

Stroke is the second leading cause of preventable death and the fourth leading cause of lost productivity. At least of stroke survivors have limited independence. Thus efficient diagnosis, therapy, rehabilitation, and care in patients after stroke constitute important scientific, clinical, social, and economic challenges.

Assessment and treatment of gait disorders after stroke constitute a major component of post-stroke rehabilitation. Locomotion in post-stroke patients may be severely compromised. Disturbed (as a result of a stroke) motor control influences gait movements and the expected rate of recovery of walking function. Gait impairments can be, for example, a significant factor in falls and mobility limitations. The main element of the gait-related rehabilitation program of stroke survivors is task-related training

Institute of Mechanics and Applied Computer Science, Kazimierz Wielki University, ul. Kopernika 1, 85-074 Bydgoszcz, Poland e-mail: piotrekp@ukw.edu.pl

D. Mikołajewski e-mail: dmikolaj@ukw.edu.pl

P. Kotlarz e-mail: piotrk@ukw.edu.pl

E. Mikołajewska

P. Prokopowicz (B) · D. Mikołajewski · P. Kotlarz

Department of Physiotherapy, Nicolaus Copernicus University, Ludwik Rydygier Collegium Medicum, ul. Jagiellonska 13-15, 85-094 Bydgoszcz, Poland e-mail: emiliam@cm.umk.pl

with the strong dose of practice [22]. Diverse technologically complex interventions (from repetitive task-specific practice to complex games involving robotic systems, virtual reality, and augmented reality) may be applied to improve gait post-stroke. Availability, mode of application, and costs of the particular methods may vary, but the key issue focuses on their efficiency. Pure compensatory effects avoiding is also important.

Despite efforts of scientists and clinicians, the validity of many interventions within rehabilitation of gait post-stroke appears to be limited. Outcomes of gait recovery due to rehabilitation depend on many factors, including location and size of the lesion, kind and severity of impairment, available activity, cortical activation, and associated rehabilitation-induced activity-dependent neuroplasticity. To establish an adequate, flexible, and efficient rehabilitation program, the key element is a selection of the appropriate measurement tool according to the individual's level of function. Such a tool, used in everyday clinical conditions, should be simple, quick, cheap, exact, sensitive, valid, and relevant. What is more, possible impairments in gait coordination may be a cause of falls and diverse mobility limitations, thus therapy should be introduced as early as possible [7]. There should be a possibility to use the clinical tool for gait assessment at every stage, even early post-stroke, to assess both quantitative and qualitative parameters and compare results to the norm or other patients. Such an approach may help to restore the patient's best possible functioning [13, 14]. Improved assessment tools allow more detailed, valid, and reliable gait assessment independently of the phase of the rehabilitation program, and construction of efficient gait rehabilitation models in post-stroke patients. Current evidence does not demonstrate such a tool which is clinically, statistically, and economically important [5]. Gait velocity, although important, does not reflect changes in gait quality.

Gait quality is important for harmonic long-term efficiency of gait recovery. Even slower, but high-quality gait patterns at an early stage of rehabilitation may provide better long-term rehabilitation results reflected in various gait parameters.

The aim of the study was to assess a new fuzzy-based tool for measurementobserved gait parameters (velocity, cadence, and stride length and their normalized values), both in healthy people and post-stroke patients. The hypothesis is that this fuzzy-based tool for measurement-observed gait parameters is effective in the assessment of gait re-education in patients after ischemic stroke.

#### **17.2 Methods**

#### *17.2.1 Subjects*

The investigated group consisted of 50 patients: 25 healthy ones and 25 after ischemic stroke. Ischemic stroke is the most common stroke type; it constitutes approximately 80–85cases [3, 4]. A study group was established on the basis of the criteria described. Inclusion criteria for patients were as follows: age above 18 years,


**Table 17.1** Patients' overall profiles

time after cerebrovascular accident (CVA) from 6 weeks to 3 years, and diagnosis of ischemic stroke. The inclusion of patients was confirmed each time by medical records. Inclusion criteria for healthy people were: age above 18 years and lack of CVA and other diseases influencing gait function in the medical record. The patients' profiles are presented in Table 17.1.

#### *17.2.2 Methods*

Healthy people were assessed once. Post-stroke patients participated in the rehabilitation program. Patients were treated by the same experienced physiotherapist (>15 years of experience in neurorehabilitation). Ten sessions of the therapy were provided in 2 weeks (10 days of the therapy). We used our own method of gait analysis, described in [12–14]. It is based on gait recording using a video camera with visual gait evaluation, measurement of temporospatial gait parameters (gait velocity, cadence, stride length) and their assessment, and calculating normalized values using the Clinical Gait Analyzer (free software developed by Ch. Kirtley). Measurements were performed in every post-stroke patient twice: on admission (before the therapy) and after the last session of the therapy to assess rehabilitation effects.

#### *17.2.3 Statistical Analysis*

Wherever possible, the results are given as mean, SD, median, minimal value, and maximal value. The Shapiro–Wilk test of normality was applied. The calculation of correlations (Spearman's rho) was made based on changes of parameters: gait velocity, cadence, and stride length, their normalized values, and results of the fuzzy-based assessment. The data were analyzed with the Statistica 9 software. The results were statistically analyzed using the Wilcoxon's test. The level of statistical significance (p value) was set at 0.05.

#### *17.2.4 Fuzzy-Based Tool for Gait Assessment*

The subject of the research-the quality of gait-is a difficult term for formal precise definition. It depends on the general public and varies depending on the group we consider to be the norm in terms of gait. If the precise model is out of reach, we can use the tools for imprecise information processing: fuzzy systems. Their main advantage is the flexibility, intuitiveness, and clarity of rules that are easy to describe linguistically.

The concrete proposition here is the multicriteria fuzzy evaluator of gait (MuFEG) defined for the purposes of the study presented in this chapter. This tool evolved from the multicriteria fuzzy evaluator proposed in [21], the purpose of which was evaluation of multicast routing algorithms. The measure of proper gait is presented as a percentage, where is an ideal quality. Defining MuFEG's basic model for a good quality of gait, assumptions have been made that the quality of gait in people with no stroke, that is, a reference group of respondents, cannot be lower than. The presented results were achieved by combining three different descriptors of a gait. In the version of MuFEG used in the present studies, these descriptors are represented by three fuzzy Mamdani-type systems. A general idea of such fuzzy systems and precise presentation can be found in many books, for example, [1, 15, 16]. Finally, their results are aggregated to one normalized outcome. Two concurrent MuFEG approaches are used. Their working names are 1b-25 and KFNc-25. Both are based on the same assumptions and the same rules. The first, 1b-25, is the classical fuzzy system with:


The fuzzy set representing the ideal value for each gait parameter is constructed from the data given for the reference group, people without stroke. Each of them is a triangular fuzzy set (see L-R fuzzy sets notation in [6]) and is determined on all the available data. For example, let's look at set *good gait velocity* (good-GV):

$$\log \text{ood} - GV = \Lambda(\mathbf{x}; \mathbf{x}\_{mean} - \mathbf{2} \cdot \Delta\_L, \mathbf{x}\_{mean}, \mathbf{x}\_{mean} + \mathbf{2} \cdot \Delta\_R) \tag{17.1}$$

where Δ*<sup>L</sup>* = *xmean* − *xmin*, Δ*<sup>R</sup>* = *xmax* − *xmean*, *xmin*/*xmax* /*xmean*, the minimum/maximum/mean value of the gait velocity parameters for the available data about healthy (non-post-stroke) people.

As there are three systems with one input each there is no need for the aggregation of premise parts of the rules. The second fuzzy system, KFNc-25, is based on the new model of processing imprecise data, the Ordered Fuzzy Numbers (OFN; see Chap. 4). In the papers [18, 19] the name "Kosinski's Fuzzy Numbers" (KFNs) model is also used alternatively. For the calculations of MuFEG results the tool implemented by the first author (P. Prokopowicz) was used. Its basic functionality is the modeling of fuzzy systems with the OFN model as well as with classical fuzzy sets. The variant of MuFEG for classical fuzzy sets was also implemented using the fuzzy logic toolbox for MATLAB for the reference purposes. The results were the same, thus it proved the author tool in this scope is correct. As OFN is a relatively new conception, the tool in this aspect is completely a pioneer.

#### *17.2.5 Main Ideas of the OFN Model*

The OFN mathematical model [10, 11] takes into account the order of the characteristic parts of a membership function of a fuzzy number. As a result, it extends the general idea of fuzzy numbers with an additional feature, a direction. As the result of using the direction in calculations, we have the opportunity to reduce the imprecision of the following operations. The OFN computational model has a number of properties. Some of them were presented in [17]. Apart from good calculations, the direction also gives additional potential in the interpretation of fuzzy data. It can be treated as a direction of the process, for example, "Velocity is high and is growing," is a different situation from, "Velocity is high, but is decreasing." The direction of the OFN can be used to represent the difference between these sentences. Because we deal with additional information, there is a need for the new methods which benefit the full potential of OFNs in modeling of linguistic data. The papers [10, 17–20] describe the research of the OFN processing methods that consider the direction.

Thanks to the new property, a new potential for the practical use of OFNs also appears with a new quality associated with the direction. The work [8] presents the practical use of this property in modeling financial data, and [9] diversity of opinions in social networks. In [2] the application of OFNs for an ant colony optimization algorithm is presented. Here we use the new model for defining an assessment tool for gait.

#### *17.2.6 OFN Model in Gait Assessment*

At the present stage of the research presented in this chapter, considering the direction is not a key element. However, for the future extent of this research OFN gives additional potential. It presents the possibility of trend processing (see Chap. 4). In a gait assessment, measuring the trend of changes can be more valuable than the only present quality. It is especially appropriate when we want to evaluate the effectiveness of different therapeutic approaches. The MuFEG system in the OFN variant used here is designed as generally preferring higher values of inputs. For example, for the stride length, the value near the lower limit of healthy people's interval gives a worse result than the value near the upper limit.

## **17.3 Results**

The results are presented in Tables 17.2, 17.3, and 17.4.

Changes in the six main temporospatial parameters were reflected in the changes of MuFEG-generated percentages both in healthy people and post-stroke patients. The main statistically relevant correlations observed in the study were similar in both groups.

#### **17.4 Discussion**

Post-stroke patients often suffer from multiple limitations of the ability to perform everyday activities. Thus they need rehabilitation in more than one area. But an assumption may be true that it is hard to achieve simultaneous recovery in all areas (including gait function, hand function, activities of daily life) in a relatively short period of rehabilitation (10 sessions) [13, 14]. In the described research we focused on gait rehabilitation. The study has focused on determination of changes in gait parameters (gait velocity, cadence, and stride length) observed as a result of the therapy in a group of patients after ischemic stroke. No doubt, there were observed statistically relevant changes in gait parameters as the result of the therapy. A good quality of the gait depends on many different factors. We must remember that we compare the gait of people after stroke with a reference gait of people without stroke. However, in the context of the evaluation, these model people are considered as healthy; in fact, their gait may be affected by many different factors, ranging from diseases other than stroke, through bad habits of posture or finally physical fatigue on examination day. Thus it is obvious that the good quality of gait evaluation is not a crisp value.

The proposed solution is an element of the broader concept, using fuzzy numbers, fractal dimension, and artificial neural networks to analyze the human gait in a more


**Table 17.2** Results of the study-traditional approach

(continued)


**Table 17.2** (continued)

comprehensive way, without any wearable devices. Finally, the described system could be used both for gait analysis of runners and for developmental issues of children. Three possible results of the therapy (recovery, no change, and relapse) may confuse analysts. But the main result of short-term therapy may be varied. Sometimes gait re-education aims at increasing gait quality, and the changes in gait velocity or cadence will be observed during the next rehabilitation periods. Fuzzy-based software should provide full support for the data analysis in such cases.

The most important advantage of the MuFEg is that it does not require any additional procedure: temporospatial gait analysis is a part of normal clinical practice in neurorehabilitation. Moreover, the result of our analysis reflected in one number has enough informative and predictive power and allows the assessment of the general tendency. Thus the EBM-based clinical decision-making process may be quicker and easier. Of course, if necessary, detailed temporospatial gait parameters also may be used. The main limitation of the research is a small sample, but we regard this study as a preliminary one. The discrepancy between results shown in Tables 17.3 and 17.4 proves the necessity of further calibration of the MuFEG algorithms, including various samples of healthy people and patients, even on much bigger retrospective datasets.

The next step will also be establishing an online version of our gait analyzer, to gather opinions of other MuFEG users and medical data analysts. Bigger samples should provide further comparative studies on validity and reliability of the proposed fuzzy-based measurements. Results of the pure study show that physiotherapy interventions significantly influence gait function and coordination. However, even the most promising approaches aiming at restoring gait coordination require reliable


 rho values) for healthy people


(continued)


clinical diagnostic tools. Such tools allow for more objective diagnosis and reassessment (performed at every stage of the rehabilitation to check progress in the therapy), and may help to achieve a better understanding of the nature of both neuroplasticity and coordination deficits in functional tasks after stroke and their optimal role in the neurorehabilitation.

Future research also requires work with the MuFEG system. In particular, the OFN variant provides an interesting potential of flexibility. Considering trends in the information will allow for searching the solutions that estimate therapy methods in the various contexts. For example, we can prefer the improvement of the quality of gait which is small but regular over a large but occasional one. For the future, it is also worthwhile considering distinguishing the differences in bad estimations, particularly in the cases when results are too low and too high. Moreover, based on the good arithmetical properties of the OFN model it is possible to provide fluent use of such imprecise data in further processing without additional transformations.

#### **17.5 Conclusions**

In the previous sections tools for measurement of the quality of gait were presented. They are based on the fuzzy system conception that allows for creation of the formal model from linguistic opinions. It is, in general, the main advance of the fuzzy system approach. The model formulation is intuitive and easy to understand not only for a computer science researcher but also for medical personnel. Analysis of the results presented in Tables 17.3 and 17.4 confirm that the proposed new fuzzy-based tool for measurement-observed gait parameters (MuFEG) may be efficient both in healthy people and post-stroke patients.

One of the tools was based on the specific OFN model. The research presented here shows that is possible to use that kind of fuzzy system in similar situations as the classical fuzzy systems. In addition, the use of an OFN model-based tool seems more appropriate as it has more flexibility for future expansion of the research. It seems to be a good direction to search for a tool to obtain a measure of tendency in the changes of results after long-term rehabilitations.

#### **References**


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Chapter 18 OFN-Based Brain Function Modeling**

**Piotr Prokopowicz and Dariusz Mikołajewski**

**Abstract** A modeling approach may significantly help to explore the problem of weak understanding of the physiological and pathological central nervous system function in the most noninvasive and comprehensive way. The aim of this chapter is to assess and discuss the extent to which possible opportunities concerning computational brain models based on fuzzy logic techniques may be exploited.

## **18.1 Introduction**

Structured networks and functional connections of interacting neural populations underlying both physiological and pathological central nervous system (CNS) function are still poorly understood. Interdisciplinarity and independence of research provide a variety of scientific approaches, used tools, and wide coverage and even overlapping of the research fields, especially as regards human research, including neuroscience [1]. The modeling approach may significantly help to explore the aforementioned problem in the most noninvasive way. The aim of this chapter is to assess and discuss the extent to which possible opportunities concerning computational brain models based on fuzzy logic techniques may be exploited.

P. Prokopowicz (B) · D. Mikołajewski

Institute of Mechanics and Applied Computer Science, Kazimierz Wielki University, ul. Kopernika 1, 85-074 Bydgoszcz, Poland e-mail: piotrekp@ukw.edu.pl

D. Mikołajewski e-mail: dmikolaj@ukw.edu.pl

## **18.2 State of the Art**

#### *18.2.1 Theory*

Researchers within the basic sciences follow their intuition, knowledge, and creative thinking, finally formulating principles of nature [1]. It is easier to derive general mechanisms because they are often repetitively used in many versions. Thus gathered information may be more complete. An additional problem within knowledge gathering is ensuring the highest possible quality of research. An important way to assess relevance of research seems to be critical peer reviews, including novel approaches including the role of preprint servers (such as ArXiv) and open reviews. Due to emerging interdisciplinary approaches, a variety of used methods and tools, and overlapping methodologies, it is hard to ensure the quality control of scientific papers. Weaknesses of traditional preprint reviews (such as inability to detect errors/fraud, lack of transparency and reliability, potential for bias and unethical practices, inconsistencies among reviewers) may be eliminated by quicker postprint reviews, supporting the relevance of evidence and building knowledge. This may constitute a novel gold standard in the assessment of scientific papers [12, 22, 24, 30, 60]. The functional organization of the central nervous system (CNS) in humans is not fixed. No doubt functional representations are dynamic and continuously modified by the human's experience due to experience-dependent plasticity as far as neurological diseases or injuries and natural age-dependent neurode-generative changes are concerned.

#### *18.2.2 Modeling Complex Ideas with Fuzzy Systems*

Fuzzy set theory [66, 67] offers powerful potential in modeling imprecision understood differently from possibility. There are many publications that gather basic ideas [38, 39, 56]. As mentioned in previous sections, researchers who work on the problem of brain modeling often try to connect practical observation results with intuitive knowledge. Some parts of this knowledge are precisely formulated but other parts are vague. This gives us an opportunity to use an experience of the brain modeling scientists and merge it with the concrete results of available research. The theory of fuzzy sets offers help for defining formal models in situations where only linguistic description is possible [67]. The idea of hierarchical fuzzy systems [19, 20, 48] offers special modeling potential which is a good tool for representing complex dependencies. It preserves the intuitive linguistic description of a model and also allows description of highly complicated relationships. When the modeled object needs quantitative parameter representation, use of the classical theory of fuzzy sets can pose some calculation problems. The specific model of Ordered Fuzzy Numbers (OFNs) overcomes typical computation problems with classic fuzzy numbers (see [27, 28, 42] and also Sect. 4.2 of Chap. 4). An additional advantage of OFNs is the potential for modeling a trend, which provides a process with more information than only value. As it is intuitive information provided by the experienced brain modeling scientists it makes it easier to represent the dependences as growing and decreasing. In the following parts of this text the idea of a fuzzy inference block is presented (see also [45]). It is a basic conception for modeling complex dependencies using the general fuzzy concept. The OFN have special application potential there.

As another interesting application of OFNs, in Sect. 18.6.3 of this chapter the proposition for modeling the learning rate coefficient (an important element of the neural network adaptation procedure) is presented and discussed.

#### *18.2.3 Clinical Practice*

Knowledge exploitation is not easy, the evidence-based medicine (EBM) paradigm. The so-called EBM triad combines three main factors influencing the clinical decision-making process:


Incorporation of EBM provides conscientious, explicit, judicious, and reasonable use of novel reliable evidence in clinical decision making about the care of individual patients [33]. An ideal research method for clinical purposes should be direct, noninvasive, and sufficient spatial and temporal resolution of the purposeful representation imaging in an awake patient. The common strategy aims at a more complete brain atlas incorporating and integrating anatomy in macroscale, microscale, and nanoscale, and data from medical imaging, including functional ones (fMRI, MRI, DTI, MEG, etc.).

The aforementioned solution would be useful for better understanding of brain structure and function, both from a physiological and pathological point of view [58]. The ultimate aim is the identification of disease-related alterations affecting neural structures and their functional connectivity [23]. Moreover, interdisciplinary studies may fill the gaps between all of the involved disciplines that are still unexplored. It requires bigger teams consisting of neuroscience theorists, physicians, neuroanatomists, and specialists in image analysis, data analysis, computational neuroscience, molecular biology, physiology, cognitive science, and even philosophy. Invalid or incomplete integration of neural information within the human brain is perceived as the main cause of mild and severe neurological disorders, affecting not only cognitive processing, but also emotional processing and motor control. Invalid synchronized or simply unsynchronized structures may be deployed far from each other, and their weaker than usual co-occurrence of excitation/inhibition may be hard to detect. Thus structural connectivity (SC) is only one part of functional connectivity (FC). Their exact and complete description is far beyond our current possibilities, but despite that, such results for particular diseases have been reported [23]. Analysis of the interaction between social and biological determinants of behavior emphasizes better understanding of the complexity of the human brain in action thanks to:


Large prospective datasets of patients with Alzheimer's disease (AD) allow us to construct advanced brain models of (physiologically) healthy subjects and patients with AD (with pathophysiological changes occurring over time). Despite the huge amount of information taken into account and efforts of scientists, the aforementioned models are still regarded as inadequate. Their limitations are: lack of scaling (i.e., they are single-scale) and lack of reflecting the complexity and interdependence of brain changes at different levels (molecular, cellular, tissue) [49]. We should take into consideration that changes in a patient's brain may take place much earlier than visible symptoms and diagnostic outcomes. Thus early diagnosis providing datasets for early changes within the central nervous system may be difficult to obtain. MR elastography (MRE) varies for a healthy brain, but is regarded as a reliable marker of neurodegenerative disease (e.g., dementia) [35]. Rapid development of artificial stimulation techniques (e.g., transcranial direct current stimulation, tDCS) both in clinical practice and cognitive neuroscience research requires development of a completely novel family of computational models of such phenomena [47].

## *18.2.4 Models for Linking Hypotheses and Experimental Studies*

The simplest relationships among theory, computational models, and experimental research are:


Detailed strengths and limitations of computational brain models have been analyzed in [45]. The most advanced projects within neuroscience such as the EC Human Brain Project are hard to plan and develop; there is a lack of simple principles within understanding the brain (neural codes, transformation laws) and no particular scientific method has proven to be the right one. Even selecting any single direction regarded as the most probable is not always possible; despite the best current knowledge, previous achievements, and further efforts there is very limited chance to hit the target. Thus application of traditional scientific paradigms that proved to be successful during the last several centuries may be insufficient [1]. There is a need for a novel approach, derived from accumulated knowledge and experience of many scientists, creatively engaging interdisciplinary approaches and tools. Henry Markram has defined seven challenges for neuroscience [32]:


Although the assumption that realistic computational models are easier and quicker solutions than reconstruction of the whole brain region or even the whole central nervous system [14] may be true. To build a model of the whole brain we have to take into consideration 1,000 different gray matter regions, 5,000 neuron classes, and up to 100,000 macroconnections between the aforementioned neuron classes, which are not always fully identified [4]. The volume of the human cerebral cortex similar to a pinhead (1 cubic millimeter) can even contain up to 27,000 neurons and 1,000,000,000 synapses. Moreover, the data derived from research on nonhuman brains cannot fully substitute information on humans. Although some brain organization aspects are common to all mammalian species, certain fundamental structural and behavioral aspects are unique to humans, including evolutionary adaptations and neurotransmitter modulatory effects involved in many neuropathologies (Parkinson's disease, Alzheimer's disease, depression, etc.) [13]. Computational models may be regarded as simplified abstractions but they link more complete data concerning anatomical structure with incomplete information concerning somata and the processes within cellular components gathered thanks to light microscopy and electron microscopy [10].

## **18.3 Concepts**

Requirements for relevant computational models of CNS are:


Some researchers also require portability (i.e., cross-simulator validation and exchange of models thanks to formats open to interconnection), but it may be hard to achieve.

## *18.3.1 Data Ladder*

Reconstruction of the connectivity map of the brain (connectomics, i.e., tracing the aforementioned map accompanied by better understanding of related interactions) need diverse approaches and scales [54]. A data ladder shows coincidence and correlation among processes and mechanisms taking place at subsequent levels of the human body (from the bottom): genes →, proteins →, neurons →, neuronal dynamics →, and whole brain process → behavior [32]. Genetic factors may influence prognosis in many diseases and injuries, including pathophysiology of traumatic brain injuries. The aforementioned assumption may potentially lead to new treatments and improved outcomes of therapy and rehabilitation [16]. A more detailed view of CNS covers nine levels (from the bottom):


## *18.3.2 Models of a Single Neuron*

There are many shapes and sizes of neurons. Thus modeling of a single neuron constitutes a true challenge and requires an individual approach. The key question is: how does a particular neuron transform synaptic inputs into potential action output. Although a single neuron can be divided into distinct morphological and functional regions:


there are many exceptions: bidirectional connections, electrical synapses, various axosomatic and axodendritic synapses, and the role of neuron-glial interaction within information processing [14]. Realistic modeling of brain functions is based on a more detailed biophysical description of neurons and synapses (at the molecular and cellular levels) integrated into microcircuits, and then further integrated in largescale brain networks and even brain systems [11]. Seven models of a single neuron may be multilayer: from the electric field distribution, through modeling of the single compartment effects, to the multicompartment neuron model [47]. Accurate 3D reconstructions of neurons are typically created using:


## *18.3.3 Models of Biologically Relevant Neural Networks*

According to the concept by DeFelipe [14] there is a need to identify the general connection matrix of the brain based on three main levels of operation and modeling:


Imprecise connectomes and incomplete synaptomes require an integrative approach to fill the gaps. Statistical models allow us to determine the range of variability of the particular parameters by sampling relatively small regions of the brain, especially within the cortex. There is a need for careful limitation of such an approach to avoid imprecision of estimation (e.g., ranges and types of synapses). The main initiatives concerning modeling of biologically relevant neural networks are:


Analysis and interpretation of the functional brain networks during different cognitive activities require advanced approaches to the spatiotemporal and spectrotemporal brain data such as Functional Pattern Graph, NeuCube, and Intrinsic Signal Optical Imaging [26, 36, 57]. Simplified computational models of convective drug distribution in the primate brainstem were consistent with the outcomes of in vivo experiments [55].

## *18.3.4 Models of Human Behavior*

The key issue constitutes models of learning within CNS. The learning process is often identified with modification of interneuron connection strength. Different learning rules may be applied. Moreover, synapses may change the strength of their response to neural activity in two basic ways:


## **18.4 Traditional versus Fuzzy Approach**

There are three basic areas of OFN application within computational brain modeling:


#### **18.5 OFN as an Alternative Approach to Fuzziness**

The OFN model is introduced in detail in Chaps. 3 and 4. Generally, it is a tool for processing imprecise quantitative values represented by fuzzy numbers. OFNs have an additional feature used in processing: direction/orientation. It allows us to define arithmetical operations in a new way. The proposed methods maintain the basic computational properties of the operations known for real numbers. Apart from a good calculation capacity, OFNs also offer new possibilities for processing imprecise information. The new property, an order, has a major impact on the calculations, but also provides a new potential for processing data in fuzzy systems. We can include into the fuzzy value additional interpretations apart from the membership value. The new feature of processing is called 'sensitivity for the direction' (see [43, 44, 46] and Chap. 5) and makes it possible to involve in a model such expressions as, 'The temperature is about 20 ◦C and it is increasing'.

In the case of the OFN model and processing methods that can be called 'arithmetic' (see [40, 41, 43, 44]), at each stage of the fuzzy system process we deal with the quantitative aspect of the data. Thus we consistently obtain fuzzy numbers at each step: the aggregation of premises, the inference and the accumulation-aggregation of the rules answers. Such property of a fuzzy system is even more important when modeling the complex relationships of the brain functions. It can be used as a parameter for other calculations without the direct output of individual rules. It can be hard to achieve this in a traditional fuzzy approach when during processing in the fuzzy system the quantitative character of processed data is generally lost.

#### **18.6 Patterns and Examples**

#### *18.6.1 Intuitive Modeling of the Complex Functions*

This concept was already presented in [45], and its key elements are provided here. A significant part of our knowledge about the functions of the brain is vague and imprecise. Thus, fuzzy logic seems to be a good solution when we look for tools used in modeling such an object. Although fuzzy techniques are used in object recognition and linguistic property modeling [29], there is only poor evidence concerning their use in brain simulations. There is a need for a novel, more effective approach, providing a better, clear, and easy understanding of the processes underlying brain function.

It is difficult to describe a simplified brain function in the form of mathematical equations. As mentioned before, brain function arises from complex behavior of units on the lower level (neurons, synapses, etc.). It makes this situation similar rather to multiagent architecture. However, a cascade and hierarchical fuzzy logic systems [19, 20, 48] may provide another insight into the behavior of the particular subsystems or mechanisms, allowing easy configuration and use of complicated sets of semirealistic features. Processing of information using a fuzzy system usually begins with a fuzzification operation and ends with defuzzification. Fuzzification, in general, is the conversion of a crisp value into a fuzzy one and defuzzification is a reverse operation. This operation can be done in many different ways. A choice of a proper method (especially the defuzzification method) often has a significant impact

on the correctness and effectiveness of the whole model. Furthermore, the change of a fuzzy value into a crisp one is the replacement of a complex value with a simpler one. Such action usually involves some approximation or rounding, therefore it introduces an additional error into the results, as it is generally associated with losing some part of the information. The repetition of such operations is not recommended, due to the cumulation of the amount of lost information. It is especially inappropriate to use the output value of one stage as the input value for another.

If we want to use fuzzy values for modeling more complex structures such as the brain, the exclusion of the fuzzification and defuzzification operations outside the base system is recommended. Therefore as the basic tool for processing complex functionality expressed linguistically we propose to define a fuzzy system without fuzzification and defuzzification stages as the fuzzy inference block (FIB). The idea is presented in Fig. 18.1.

Such an element is a conceptual base for cascade modeling of complex relations described linguistically. The potential of such an idea in modeling complex relations is presented in Fig. 18.2.

It is worth noting that every FIB can represent one agent from the multiagent architecture. With this approach, we can describe even more complex structures. It is easy to imagine that, in place of individual FIBs, we can insert another complex system so it seems to be a kind of recursion, where only the lowest level relates directly to the FIBs. Still, despite the high complexity of the model, relations are described linguistically at various stages.

However, although the idea of FIBs seems to be quite suitable for the linguistic modeling of complex relations, some problems may arise. The classical methods for fuzzy models often produce fuzzy answer sets, which are quite fragmented, not normal, and not convex. Such results are formally still fuzzy sets, but their forward processing without defuzzification could be questionable.

Such problems do not occur if we use the OFN model. Its important advantage here is that we get a kind of fuzzy number at each stage of data processing. Thus the further use of such a result is easy and smooth without the need for defuzzification and then fuzzification again.

#### *18.6.2 Improving Policy Gradient Method*

Apart from modeling complex functionality described linguistically, the OFN can be used in other areas connected with brain modeling. A neural networks idea comes from knowledge about basic brain structure: see articles of the neurophysiologist Warren McCulloch and a mathematician Walter Pitts (1943) [34], "The Organization of Behavior" of Donald Hebb (1949) [21], and articles of Bernard Widrow and Marcian Hoff on ADALINE and MADALINE in the early 1960s [61]. The aforementioned ideas periodically failed or became more popular, but in the twenty-first century, called the century of neuroscience, a reasonable use of the old ideas may cause another breakthrough with deeper understanding of the central nervous system function. Issues of the average reward optimization, especially in the domain with partial observability (e.g. noised), are not easy to replicate within models of predictive state representations. Computation of the average reward depends on many parameters, and varies significantly, especially in a nonstationary environment. Permanent states and actions make this task particularly difficult. Obviously, the complexity of a well-known task and the associated reduced number of dimensions may increase efficiency of the computational system, but we should be aware that the brain calculates such tasks almost in real-time, taking into consideration many hidden states (e.g., environment, past behavior, own preferences, or even emotions). Such computational processes may reflect natural error-driven learning and adaptation, thanks to built-in short-term neuroplasticity, and their influence on long-term brain plasticity (e.g., memories, motivations, feelings, etc.). Thus enhanced discrimination of the single neuron, use of synapses as estimators of presynaptic membrane potentials, and temporal and spatial processing may be reflected in neuronal computation of the brain area function/response. Even connectomics cannot avoid current technical limitations. Although fuzziness of this process and nonrandom features of cortical connectivity allow some attempts with OFNs, these attempts, although simple, may play a significant role within the richness of its high-level cognitive processes as well as provide quicker and more predictable calculations. Earlier studies on policy

gradient methods within reinforcement learning [18, 59, 62, 65] showed the positive role of the optimizing parameterized policies with respect to the expected return by a gradient descent, without their many disadvantages. As a result, we can more deeply understand reward-related learning problems in animals, humans, or machines. Thus we propose our own solution of the element of the long-term cumulative reward, taking into consideration its fuzziness.

One important issue on this subject is also the problem of objective function optimization. Finding the maximum value of the reward function *R* is often a guarantee to find the best change in a given step. However, the cost of calculating such an optimum can be too high to ensure its practical usefulness. This applies especially to situations where this reward function changes dynamically during time steps. A better choice may be to improve other parameters such as the learning rate coefficient, for example.

The change of weight between *ni* and *n <sup>j</sup>* is calculated as follows.

$$\frac{dw\_{ij}}{dt} = aR(t)e\_{ij}(t)\tag{18.1}$$

where *a* is the learning rate, the number from the [0; 1] interval, *R* is the reward function, and *ei j* is the eligibility trace between *ni* and *n <sup>j</sup>* neurons from two adjacent layers (see Fig. 18.3).

Both the reward function and eligibility trace are complex problems. Expanding them with further calculations requires a lot of caution, because it is easy to overload the process with time-consuming computations. Therefore to improve a solution of the problem with determining weights of neurons the learning rate coefficient seems the right choice, for a start. It is worth noting that the learning rate at the 0 level is in fact no change of weight, thus no adaptation will proceed in such a step. Therefore the interval *(*0; 1] could be used instead. However, the zero level can represent the perfect optimum where the adaptation of this weight definitely ends, thus formally we keep zero as the low-bound in the interval of values for the learning rate.

**Fig. 18.4** Input and output values for the classic fuzzy system

#### *18.6.3 Modeling Learning Rate with the OFNs*

The learning rate is a real number from the [0; 1] interval. The less value there is, the smaller are the changes applied to the weight (see formula 18.1). Many scientists focus their work on the adaptation and other changes of this coefficient [15, 31, 53]. In general, when an idea of switching the learning rate is used in the neural network it is recommended that values of this parameter should be greater at the start of the process adaptation, when weight changes also are higher. In the course of the adaptation development the changes of weights are smaller, and the learning rate also should decrease. The above assumptions enable formulation of linguistic rules in a classic fuzzy system context as follows.


If we define 'low' and 'high' as fuzzy numbers (see Fig. 18.4), we can generate the learning rate value directly from such rules. The general conception of the proposed fuzzy system is to appoint the learning rate on the basis of previous change of the weight expressed as a percentage.

As an alternative, a simple fuzzy system based on the OFN model and its special methods and properties is proposed.

With the use of the OFN model context, we can formulate just one rule that expresses a trend of changes in the learning rate parameter.

• IF 'previous change' is 'about 50% and decreasing' THEN 'learning rate' is 'about 0.5 and decreasing'

Figure 18.5 presents the OFN for the rule above.

If we use 'the directed inference by multiplication with a shift' presented in Sect. 5.4.1 of Chap. 5 a single rule will be sufficient to express the expected dependency. Figure 18.6 shows the examples that present the general idea of the proposed processing. One can see that the activation in the *down-part* area of input, 'the previous change' will shift the result in the direction of the *down- part* of the OFN from the conclusion. An analogous situation will be with the *up-part*. Thus it is possible to reach the whole space of output values.

**Fig. 18.6** OFN for fuzzy system

#### **18.7 Discussion**

The system proposed in the previous section is very simple, and generally gives exactly the same results as simple mapping from the [0; 100] interval into [0; 1]. But this proposition shows the potential of applying OFNs in linguistic modeling of the learning rate. We may intuitively change the algorithm by changing the linguistic expression. If we want to obtain a smaller learning rate in the case where the previous change of weight is below 30% we may formulate the rule linguistically:

• IF 'previous change' is 'about 30% and decreasing' THEN 'learning rate' is 'about 0.5 and decreasing'.

Figure 18.7 presents the example for such a rule. The input value is the same as in the previous case (see Fig. 18.6), therefore we can compare the results. Now it is not a simple proportional mapping between intervals [0; 100] and [0; 1]. It considers the preferences expressed linguistically. One can observe in Fig. 18.7 that a trend is preserved, because the input is still on the *down-part* side of the OFN for the premise part of the rule, thus the result is on the *down-part* side of the OFN from the conclusion.

Using the same intuitive way, we can easily modify the conclusion of the rule. If we want, for example, to keep the value of the learning rate above 0.7 until the previous change of weight is not lower than 30%, we can express it by the rule as follows.

**Fig. 18.7** OFNs for fuzzy system

• IF 'previous change' is 'about 30% and decreasing' THEN 'learning rate' is 'about 0.7 and decreasing'.

The above examples show the intuitive and flexible usefulness of modeling the learning rate using OFNs. Nevertheless it is also worth noting that we have OFNs at output. We can, of course, defuzzify the result, but the learning rate is only part of a complex algorithm of calculating the weight change of connections between neurons as presented in the formula 18.1. If we use the OFN for modeling other elements such as 'reward function' or 'eligibility trace' there will be another fuzzy number in the algorithms. Because defuzzification generally causes loss of part of the information, we should therefore do it at the end of all calculations instead of only after determining the learning rate coefficient. It enables us to process full imprecise information contained in the data until the moment when we really need a precise result.

#### *18.7.1 Results of Other Scientists*

Current approaches to central nervous system modeling aim at bringing experimental, computational, and theoretical results closer. Scientific questions should help to decide which approach can be regarded as minimal. Experimental outcomes and nonlinear interactions cannot be ignored even within the minimal computational models, because they may cause misleading conclusions or even confirm erroneous theories. Thus ad hoc simplification must be very careful. There are still many gaps in neuroscience (e.g., fragmented data sets), as regards both knowledge and experience; thus there are discussions concerning limitation of amounts of free parameters within models (which may cause so-called island models) without the possibility of comparison with the others and tuning using experimental datasets. The most important challenge is integration of the current data into a unified model of the brain as a single multilevel model. We need to explore, verify, and apply experiences from many various areas of science: from modeling of severe illnesses [17] and traditional neuronal networks [50, 51], through liquid state machines [63, 64] to liquid and gas distribution in porous materials [7–9].

## *18.7.2 Limitations of Our Approach and Directions for Further Research*

The main limitation is a high amount of knowledge and experience as well as a need for an interdisciplinary research team to prepare valid and relevant models. Such teams, incorporating clinicians, are rare.

Consensus concerning model classification, performance, and interpretation is needed to provide consistent methodology to ensure diagnostic and prognostic consistency. A coherent theoretical framework for explaining SC and FC patterns and their alterations in brain diseases is required. The high computational power of the brain coupled with low consumption of energy may serve as a basis for the next generation of computational devices. Neuromorphic computing systems may allow us to reflect the stochastic behavior of simple, reliable, very fast, low-power computing devices embedded in intensely recursive architectures, based on brain-derived patterns [6].

#### **18.8 Conclusions**

Our results confirm that our new OFN fuzzy-based approach towards brain function modeling may be efficient and helpful in some time-consuming computational problems. Such a fuzzy-based approach may in selected cases also be more similar to natural neural signal processing than classical digital models. The idea of a fuzzy inference block opens a new direction towards the use of good processing properties of an OFN model in describing complex functions while preserving the intuitiveness of linguistic description. It seems to be of particular importance for the area where two scientific disciplines meet, that is, medical research dealing with diseases and injuries of the brain and computer science research.

#### **References**


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.